jQuery.ajax() method performs asynchronous http request and gets the data from the server. it allows you to send asynchronous http requests to submit or retrieve data from the server without reloading the whole page.
it can be used to send http GET, POST, PUT, DELETE etc. request. It can retrieve any type of response from the server.
Syntax: jQuery.ajax(url,[options])
Use option parameter to customize ajax request as per your need. All available options for configuring Ajax request can be listed below.
- accepts
- async
- beforeSend
- cache
- complete
- contentType
- crossDomain
- data
- dataType
- error
- global
- headers
- ifModified
- isLocal
- jsonp
- jsonpCallback
- mimeType
- password
- processData
- statusCode
- success
- timeout
- type
- url
- username
- xhr
- xhrFields