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

Re: Questions on the HTTP API utility



Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>

Hi Kevin,

We are having problems with throughput from an AS/400 to a WebSphere MQ server. Is there an API procedure that performs like the HTTP_URL_Post without waiting for any return code?

The HTTP standard requires that you wait for a response document. Without that, you have no way of knowing if the document was successfully received, or if part of it was lost.


Is there a better way than using the HTTP API utility to post transactions from an AS/400 to a WebSphere MQ server?

I have zero experience with WebSphere MQ. I assume that this is the new name for MQSeries? (which I also have zero experience with!) Doesn't MQ provide a way of sending data over a network? I thought that was the purpose behind MQ.



2. The HTTP_URL_Post function is not handling special characters such as % - / or , . Is it true that this function should automatically encode these characters?

The HTTP protocol does not place any restrictions on the type of data that can be sent in a POST request. It doesn't have to be encoded at all from the protocol's perspective. (A GET request is another matter, though.)


How data is encoded on a POST request is application-specific. Some applications require URL encoding (notably CGI scripts), some require multipart/form-data encoding, some require base64 encoding, some require the document to be well-formed XML.

So, no, HTTP_url_post() should NOT be encoding the POST data for you. If you want it encoded, call one of HTTPAPI's encoding functions prior to sending it.

By separating these functions, HTTPAPI is more flexible. If you had an application where you needed the data encoded, but didn't want to send it via HTTP, you could do that. Likewise, if you had data that was already encoded, you wouldn't need to encode it, just post it...

Make sense?
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------