GET is mostly used to obtain (retrieve) information from a server. Note that the GET method may return data that has already been cached. POST can also be used to retrieve information from a server. The POST method, on the other hand, NEVER stores data and is frequently used to provide data with the request.
url : is the only mandatory parameter.
data: A simple object or string that is sent along with the request to the server.
success: If the request is successful, a callback function is run. It takes the returned data as an argument.
dataType: The type of data the server is expected to return.
Because $. post is just a shortcut for $. ajax for POST requests, there isn't much of a difference between the two - they're both made possible by the same underlying functionality.
The jQuery. get(url, [data], [callback], [type]) method uses a GET HTTP request to retrieve data from the server. The XMLHttpRequest object is returned by this method.
You must include the data in the body of the HTTP POST message and define the MIME type of the data with a Content-Type header to deliver data using the HTTP POST method. An HTTP POST request to transfer JSON data to the server is shown below. HTTP POST requests have no size or data type restrictions.