Javascript AJAX call to Jquery Call
<p>In order to have my code written almost fully written in Jquery, I want to rewrite an AJAX call in Jquery.</p>

<p>It's a call from a webpage to a Tomcat servlet.</p>

<p>Similar code of my present situation:</p>

<pre><code>var http = new XMLhttpRequest();
var url = "http://example.com/MessageController?action=send";

http.onreadystatechange = function ()
if (http.readyState == 4)
{
    if (http.status == 200){ var response = http.responseText;}
    else {/*code2*/}
};
http.async = false;
http.open("POST", url, true);
http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
http.send(string);
</code></pre>

<p>Which would be the best way to do this? <code>.ajax</code> or <code>.post</code>? Could you help me with some pseudo code to start this?</p>
