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

[Ftpapi] Preemptive authentication



Hi,


We are occasionally getting connection failure with HTTP401 errors   This page requires a user-id & password” while trying to post JSON payload.

 

Suggestion from our integration team is to enable Preemptive authentication with in our Http Client software to avoid this failure.

 

Current code

----------------------------------------------------------------------------------------

 // Basic Authentication                         

 If P$User <> *Blanks and P$Pwd <> *Blanks;      

    user = %TRIM(P$User);                        

    pwd  = %TRIM(P$Pwd);                         

    http_setAuth(HTTP_AUTH_BASIC :User:Pwd);     

 Endif;                                          

                                                 

 monitor;                                        

  Return  (http_string( method: P$URI: P$Req     

  : 'application/json' ));                       

  on-error;                                      

  P$Msg = http_error();                          

  endmon;                                        

                                                 

 End-Proc TransportPayload;                      


-----------------------------------------------------------------------------------------------




Need you help to address this issue. 


Thanks

Robin



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