smartslack wrote:
Hi I'm sending this request for downloading the bitmap file.
StrCopy(data,"POST Content-Type: image/bitmap MyNetworkpth/waves.bmp");
But it is giving me error No: 400 which means this is the bad request.
I've tried all other combination but could not success. Can any one
give me exact fromat for sending the request..

Gosh, it almost sounds like you're trying to do HTTP in particular,
not just TCP/IP in general.

In which case, I guess you ought to refer to some HTTP documentation.
You could check out  http://www.w3.org/Protocols/rfc2616/rfc2616.html ,
specifically all of chapter 5 for making the GET request, and chapter 6
for understading the response, and 9.3 for understanding the semantics
of the GET method.

For example, to get something from http://www.google.com/index.html,
you will probably want something like this:

        GET /index.html HTTP/1.1 [cr-lf]
        Host: www.google.com [cr-lf]
        [cr-lf]

You may want to specify other headers besides just Host; that's just
an example.

Of course, once the server replies, you will need to pay attention to
stuff like Content-Length, Content-Type, response code (first line
of the response), and maybe the Content-Encoding.

By the way, it can often be helpful to fire up a telnet client (even
Windows has telnet.exe) and connect to port 80 of a web server and
experiment with making your own GET requests.  It's much easier than
trying to build it into an application before you know that you've
got the protocol right.

  - Logan

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

Reply via email to