Unlike to the HTTP GET method, which is designer to only query data from web server, the POST method may change the data on the server (for example delete some data or add a comment to a blog post). For the same reason, search engines normally use the GET and HEAD methods, to prevent their automated requests from performing such actions.
HTTP protocol POST requests may send any amount of data of any type in the request's message body. In this case, the POST header must indicate the size and type of enclosed data. An HTTP POST sample:
POST / HTTP/1.1 Host: httpdebugger.com Content-Type: application/x-www-form-urlencoded Content-Length: 27 param1=value1¶m2=value2
An example of sending HTTP POST request from JavaScript using jQuery and XMLHttpRequest:
$.post( "/", );
$.post( "/", { param1: "value1", param2: "value2" } );
$.post( "/", { 'keys[]': [ "key1", "key2" ] } );
$.post( "/", function( data ) {
alert( "Data Loaded: " + data );
});
var http = new XMLHttpRequest();
var postdata= "param1=value1¶m2=value2";
http.open("POST", "http://www.httpdebugger.com", true);
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader("Content-length", postdata.length);
http.onreadystatechange = function() {
if(http.readyState == 4 && http.status == 200) {
alert(http.responseText);
}
}
http.send(postdata);
Using HTTP Debugger for Sending and Analyzing HTTP POST Requests
HTTP Debugger comes with a nice tool called HTTP Submitter. You can use this tool to simulate any HTTP method to your server and check results, including simulating POST requests from obile devices, comleted web forms and even uploading a file to your server.
The sent request together received response can be analyzed in HTTP Debugger UI which contains lots of useful informtaion about that request.
An online version of HTTP Submitter is aviable online via this link: HTTP Submitter Online.



