It depends on the type of authentication they are requesting.
The most common type of authentication is 'basic'. If that is what is needed, you can do this prior to calling http_stmf:
: 'your user id'
: 'your password' );
If 'basic' isn't what it needs, you can make a request and let it fail with the 401, then call http_getAuth to find out what sort of authentication it was asking for. Then, you can do http_setAuth to set the appropriate type of authentication and try again.
I have been trying to use the https example. I am getting error 401 Unauthorized.
I have created the certificate as per the instructions.How do I add the userID and password?-------RPG Code:
app_id = 'AWTEC_HTTPAPI_SHAREPOINT';
rc = https_init(app_id);
if rc = -1;
: '/home/mparker/Reports.docx' );Error message:
This page requires a user-id & password
recvdoc(): Receiving 16 bytes.
SetError() #36: This page requires a user-id & password
HTTPAPI Ver 1.40 released 2019-08-15
NTLM Ver 1.4.0 released 2014-12-22
OS/400 Ver V7R2M0
New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819. ProtLoc=0
QSSLPCL = *OPSYS
SSL version 2 support disabled
SSL version 3 support disabled
Old interface to TLS version 1.0 support enabled
TLS version 1.0 support enabled
TLS version 1.1 support enabledTLS version 1.2 support enabled
-- _______________________________________________ Ftpapi mailing list Ftpapi@xxxxxxxxxxxxxxxxxxxxxx http://scottklement.com/mailman/listinfo/ftpapi