[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ftpapi] httpapi example 3



Hi,

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;                            

   http_comp(http_error());            

   https_cleanup();                    

   return;                             

endif;                                 

http_stmf( 'GET'                                                           

         : 'https://xxxx.awtec.com/sites/IT/dev/Reports/Reports.docx'     

         : '/home/mparker/Reports.docx' );                                 

 
Error message: 

This page requires a user-id & password  


Error Log: 

recvdoc(): Receiving 16 bytes.                                        

401 UNAUTHORIZED                                                      

SetError() #36: This page requires a user-id & password               

http_close(): entered                                                  


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     

https_init(): entered                                                       

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 enabled                                             

TLS version 1.2 support enabled                                              


Mike Parker
-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi