I need to send raw post data (not structured as param1->value¶m2->value and so on). So I use the following code:
Chilkat.Http http = new Chilkat.Http();
http.UnlockComponent("My code");
Chilkat.HttpRequest request = new Chilkat.HttpRequest();
Chilkat.HttpResponse response = null;
http.SessionLogFilename = "C:\\Users\\kolchakA\\Documents\\SessionLogFilename.txt";
http.VerboseLogging = true;
http.SaveCookies = true;
http.SendCookies = true;
string rawDataToPOST = "rawdata_so_simple";
response = http.PostMime("http://synoparser.ru/clientsite/cookdir/", rawDataToPOST);
=========
But I get null responce. Below I provide SessionLogFilename.txt
=======SessionLogFilename.txt=======
---- Sending ---- POST /clientsite/cookdir/ HTTP/1.1 rawdata_so_simple
======
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:
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)?
can you provide me simple example of post mime usage?