I need to send raw post data (not structured as param1->value¶m2->value and so on). So I use the following code:
But I get null responce. Below I provide SessionLogFilename.txt
---- Sending ---- POST /clientsite/cookdir/ HTTP/1.1 rawdata_so_simple
asked Dec 02 '12 at 03:10
You first need to become familiar with the most basic concepts of HTTP. All HTTP requests and responses are MIME messages. You just can't throw garbage at the server and expect a valid response. If you're sending a POST, then it must include a Content-Length header indicating the exact length of the MIME body. Calling SendMime assumes you are a little familiar with HTTP and MIME. If not, I would highly recommend the O'Reilly book "HTTP: The Definitive Guide".
HTTP requests and responses have the same format. They are composed of a "start line" followed by MIME. (For simplicity, I'm omitting the possibility of chunked responses.)
The "start line" of an HTTP request is a line such as:
GET /test/something.html HTTP/1.0
It has 3 parts: the HTTP method (GET, POST, PUT, etc.), the resource URI, and the HTTP protocol version. Following the start line is the MIME header, followed by the MIME body.
A server would consume an incoming HTTP request by reading the incoming data on the TCP socket (or possibly SSL/TLS connection) in the following way:
answered Dec 03 '12 at 18:54
can I send raw POST data (not structured as param1->value¶m2->value and so on) in some other way (without being little familiar with HTTP and MIME)?
answered Dec 04 '12 at 13:13
can you provide me simple example of post mime usage?
answered Dec 06 '12 at 03:56