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

[Ftpapi] httpapi, repeated call to program with persist_post



So I have coded up a program to not set on lr

 // if Procs is 0, then first time, option connection

if Procs = 0 ;                                                     

      URL = '' ;                           

      // Open persistent connection                                    

       pComm = http_persist_open(URL);                                  

       http_setauth(HTTP_AUTH_BASIC:                                   

                        userid: pass) ;                               

endif ;                                                            

 //  If Procs is -1, then shutdown                                 

if Procs = -1;                                                     

    http_persist_close(pComm);                                     

   *inLR = *on ;                                                   

   return ;                                                        

endif ;    

                                                        

postdata = '{"articles":[{"typeid":1,"articleSecondaryId":+   

           '+ap2+%trim(itemnbr)+ap2+'}]} ' ;                  

     rc = http_persist_post( pComm                            

                           : URL                              

                           : 0                                

                           : *null                            

                           : %addr(postData)+2                

                           : %len(postData)                   

                           : fd                               

                           : %paddr('INCOMING')               

                           :HTTP_TIMEOUT                      

                           :HTTP_USERAGENT                    

                           : 'application/json' );            

                                                               

 // I get a json array back, parse it and return…

 

 

Within the next few calls, I have lost  PCOMM, URL

 

 

 

 

 

Gerald Magnuson | Senior System I Admin


The Knapheide Manufacturing Company
1848 Westphalia Strasse // P.O. Box 7140  // Quincy, IL // 62305-7140
P: 217-592-5291 //   F: 217-592-5046 // www.knapheide.com

https://www.knapheide.com/files/source/knapheide/gallery/facebook-icon-2.png https://www.knapheide.com/files/source/knapheide/gallery/linkedin-icon-2.png https://www.knapheide.com/files/source/knapheide/gallery/instagram-icon.png https://www.knapheide.com/files/source/knapheide/gallery/twitter-icon-2.png https://www.knapheide.com/files/source/knapheide/gallery/youtube-icon-2.png

 

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