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

Re: [Ftpapi] Change HTTPAPI to respond to errors



Have you looked at the examples in the source file that came with HTTPAPI? 

On Thu, 2020-08-20 at 21:41 +0000, Baeten, John wrote:

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.





  Kevin  Bucknum
                   Senior Programmer Analyst
                   MEDDATA / MEDTRON
                   120 Innwood Drive
                   Covington LA 70433
                   Local: 985-893-2550
                   Toll Free: 877-893-2550
                 https://www.medtronsoftware.com



CONFIDENTIALITY NOTICE

This document and any accompanying this email transmission contain confidential information, belonging to the sender that is legally privileged.  This information is intended only for the use of the individual or entity named above.  The authorized recipient of this information is prohibited from disclosing this information to any other party and is required to destroy the information after its stated need has been fulfilled.  If you are not the intended recipient, or the employee of agent responsible to deliver it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or action taken in reliance on the contents of these documents is STRICTLY PROHIBITED.  If you have received this email in error, please notify the sender immediately to arrange for return or destruction of these documents.

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