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

Re: [Ftpapi] A newbie



Leo,

As for how the server decides which function to run -- that depends on the server! Frequently servers will use the URL (sometimes only part of it, sometimes all of it, etc) as you have surmised. Sometimes they use other information, for example the SoapAction header, or the port number. At any rate, you shouldn't have to worry about this, as long as you're sending what the server calls for, it'll be able to choose the proper function to call.

As for how you get back the response... it depends on which of HTTPAPI's functions you are using. http_url_post() for example will write the response to a file in the IFS. http_url_post_raw() will call an ILE subprocedure every time data comes in off the wire, so that subprocedure can accumulate it into a string if you want. http_url_post_xml() runs the data received through an XML parser, and the parser calls a subprocedure with the parsed XML tags.

So there are several possibilities, all depending on what you want to do with it.

I would suggest that you look at the EXAMPLExx members included with HTTPAPI. These contain various examples of how to send a request to a URL and get back the response in various different ways.

Good luck



On 3/2/2017 6:43 AM, Leo Burkett wrote:

I need to send notification(s) to a web site based on sales orders submitted to our back-end ERP system and have installed HTTPAPI for this purpose. This is my first experience with HTTP and I would like some help in learning about it.

I have looked at the examples, and have had limited success with a modified EXAMPLE4 to send something to myself. But it would help a lot if I knew what is going on under the covers of HTTP.

My assumption is that the URL specified in a POST request somehow identifies to the server the function that will receive and process the post data. Please correct me if I am wrong.

But I don’t know what needs to be done on my end to access and process any reply to my post. Is there documentation somewhere that discusses this? My searches on “http” and “post” tell me lots about HTML pages, but nothing about replies to post requests.

Any input you provide will be appreciated.

Thank you,

Leo Burkett



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

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