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

Re: [Ftpapi] Change HTTPAPI to respond to errors



Scott,

 

I did and would like to use the subprocedure way to make it easier and more useful.  But when we set this up in 2016, we didn’t find any other means of doing it.  And searching online now, I still do not see any examples of how to do what we are currently doing.  One of the issues is this is our only process that does it, so nobody is familiar with the correct terminology to do a proper google search for examples. 

 

Any examples or web sites would be much appreciated.

 

John

 

John Baeten

Sr IT Developer – Pest Elimination – Commercial Solutions

T 651-795-6998 E john.baeten@xxxxxxxxxx

 

From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> On Behalf Of Scott Klement
Sent: Thursday, August 20, 2020 2:48 PM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [Ftpapi] Change HTTPAPI to respond to errors

 

Caution: This email message originated from outside of the organization. DO NOT CLICK on links or open attachments unless you recognize the sender and know the content is safe. If you think it is suspicious, please report as suspicious.



Hi John,

The CL command is handy, but... only has a fraction of the functionality that HTTPAPI offers.

Have you considered calling the RPG subprocedures instead of the CL command?

-SK

On 8/20/2020 1:51 PM, Baeten, John wrote:

Our current process uses the HTTPAPI process to send data to a different system.  This is done in a RPGLE program using a RunCmd process to do the sending.  Sometimes there is a time out error (500) from the system we are sending to, and we currently do not have a way to monitor for that to give it a retry in a few minutes. 

 

wCMD =

HTTPAPI 

URL('https://websites.net/api/Pst')

DOWNLOAD(/LOG/CatalogSales_Log.txt')

REQTYPE(*POST)

UPLOAD('/Out/CATALOGPRODUCT.XML')

DEBUG('/log/CatalogSales_DBL.txt')

USER(4776-a7bf')

PASS(4776-a7bf')

 

ReturnCode = RunCmd(wCMD); 

 

After this process runs we are reading the log file to see if it was successful or not – but this only tells us that and not what the error was.  This would be in the DEBUG file.  We are hoping there is an easier way to determine the result of our POST.

 

Thanks,

 

John

 

 

John Baeten

Sr IT Developer – Pest Elimination – Commercial Solutions

T 651-795-6998E john.baeten@xxxxxxxxxx

 

CONFIDENTIALITY NOTICE: This e-mail communication and any attachments may contain proprietary and privileged information for the use of the designated recipients named above. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.



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