I don't think this is accurate. HTTP doesn't care what type of data it
transports, and doesn't handle it itself. Most of the internet media types
specified in HTTP are binary. The important thing is that both client and
server applications (not the web server, but the application that handles
the POST request -- e.g. a CGI program) know how to handle a given type.

In my application I transmit binary data between my Palm (a Symbol SPT
1740, which has a wireless network transceiver built in) client and my
server application. I made up my own media type, since none of the existing
ones seemed to be suitable. The HTTP protocol is flexible enough to permit
handling new types of data.

As to the original question, I haven't used INetLib; I use the NetLib and
my own HTTP client. This took more work but is very flexible.

-- Michael






"Philip Sheard" <[EMAIL PROTECTED]>@news.palmos.com on 06/11/2001
01:41:52 AM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  [EMAIL PROTECTED]


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:

Subject:  Re: send binary data in HTTP POST request


> Does anyone know an easy way to POST binary content type HTTP requests
> through INetLib from a Palm to a web server?  Right now it treats content
as
> type "application/x-www-form-urlencoded", instead of a binary type.
> "INetSettingEnum" has "inetSockSettingContentType", but it's read-only.

I do not think you can. If binary data is being transmitted, the sender
should encode it, and the receiver should decode it. HTTP cannot handle
binary data directly. In any event, your server is not expecting binary
data - it is expecting encoded data.

The simplest (but not the most efficient) way to encode your data is to
represent each byte in ASCII coded hex, e.g. 0x12345678 becomes
"%12%34%56%78". The % sign is the escape character used to identify
non-ASCII characters.



--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/






-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to