|
| 1 | +<?xml version="1.0"?> |
| 2 | +<?xml-stylesheet type="text/xsl" href="../entries2html.xsl" ?> |
1 | 3 | <entry type='method' name="jQuery.ajax" return="jqXHR">
|
2 | 4 | <title>jQuery.ajax()</title>
|
3 | 5 | <signature>
|
4 | 6 | <added>1.5</added>
|
5 | 7 | <argument name="url" type="String">
|
6 | 8 | <desc>A string containing the URL to which the request is sent.</desc>
|
7 | 9 | </argument>
|
8 |
| - <argument name="settings" type="Map" optional="true"> |
| 10 | + <argument name="settings" type="PlainObject" optional="true"> |
9 | 11 | <desc>A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with <a href="/jQuery.ajaxSetup">$.ajaxSetup()</a>. See <a href="#jQuery-ajax-settings">jQuery.ajax( settings )</a> below for a complete list of all settings. </desc>
|
10 | 12 | </argument>
|
11 | 13 | </signature>
|
12 | 14 | <signature>
|
13 | 15 | <added>1.0</added>
|
14 |
| - <argument name="settings" type="Map" optional="true"> |
| 16 | + <argument name="settings" type="PlainObject" optional="true"> |
15 | 17 | <desc>A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with <a href="/jQuery.ajaxSetup">$.ajaxSetup()</a>.</desc>
|
16 | 18 | <option default="depends on DataType" name="accepts" type="PlainObject">
|
17 | 19 | <desc>The content type sent in the request header that tells the server what kind of response it will accept in return. If the <code>accepts</code> setting needs modification, it is recommended to do so once in the <code>$.ajaxSetup()</code> method.</desc>
|
18 | 20 | </option>
|
19 | 21 | <option default="true" name="async" type="Boolean">
|
20 | 22 | <desc>By default, all requests are sent asynchronously (i.e. this is set to <code>true</code> by default). If you need synchronous requests, set this option to <code>false</code>. Cross-domain requests and <code>dataType: "jsonp"</code> requests do not support synchronous operation. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active. <strong>As of jQuery 1.8, the use of <code> async: false </code> is deprecated.</strong></desc>
|
21 | 23 | </option>
|
22 |
| - <option name="beforeSend(jqXHR, settings)" type="Function"> |
| 24 | + <option name="beforeSend" type="Function"> |
| 25 | + <argument name="jqXHR" type="jqXHR" /> |
| 26 | + <argument name="settings" type="PlainObject" /> |
23 | 27 | <desc>A pre-request callback function that can be used to modify the jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object before it is sent. Use this to set custom headers, etc. The jqXHR and settings maps are passed as arguments. This is an <a href='http://docs.jquery.com/Ajax_Events'>Ajax Event</a>. Returning <code>false</code> in the <code>beforeSend</code> function will cancel the request. <strong>As of jQuery 1.5</strong>, the <code>beforeSend</code> option will be called regardless of the type of request.</desc>
|
24 | 28 | </option>
|
25 | 29 | <option name="cache" default="true, false for dataType 'script' and 'jsonp'" type="Boolean">
|
26 | 30 | <desc>If set to <code>false</code>, it will force requested pages not to be cached by the browser. <strong>Note:</strong> Setting <code>cache</code> to false will only work correctly with HEAD and GET requests. It works by appending "_={timestamp}" to the GET parameters. The parameter is not needed for other types of requests, except in IE8 when a POST is made to a URL that has already been requested by a GET.</desc>
|
27 | 31 | </option>
|
28 |
| - <option name="complete(jqXHR, textStatus)" type="Function, Array"> |
| 32 | + <option name="complete" type="Function"> |
| 33 | + <argument name="jqXHR" type="jqXHR" /> |
| 34 | + <argument name="textStatus" type="String" /> |
29 | 35 | <desc>A function to be called when the request finishes (after <code>success</code> and <code>error</code> callbacks are executed). The function gets passed two arguments: The jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object and a string categorizing the status of the request (<code>"success"</code>, <code>"notmodified"</code>, <code>"error"</code>, <code>"timeout"</code>, <code>"abort"</code>, or <code>"parsererror"</code>). <strong>As of jQuery 1.5</strong>, the <code>complete</code> setting can accept an array of functions. Each function will be called in turn. This is an <a href='http://docs.jquery.com/Ajax_Events'>Ajax Event</a>.</desc>
|
30 | 36 | </option>
|
31 | 37 | <option name="contents" type="PlainObject" added="1.5">
|
|
51 | 57 | <option name="data" type="Object, String">
|
52 | 58 | <desc>Data to be sent to the server. It is converted to a query string, if not already a string. It's appended to the url for GET-requests. See <code>processData</code> option to prevent this automatic processing. Object must be Key/Value pairs. If value is an Array, jQuery serializes multiple values with same key based on the value of the <code>traditional</code> setting (described below).</desc>
|
53 | 59 | </option>
|
54 |
| - <option name="dataFilter(data, type)" type="Function"> |
| 60 | + <option name="dataFilter" type="Function"> |
| 61 | + <argument name="data" type="Object" /> |
| 62 | + <argument name="type" type="String" /> |
| 63 | + <return type="Object"/> |
55 | 64 | <desc>A function to be used to handle the raw response data of XMLHttpRequest.This is a pre-filtering function to sanitize the response. You should return the sanitized data. The function accepts two arguments: The raw data returned from the server and the 'dataType' parameter.</desc>
|
56 | 65 | </option>
|
57 | 66 | <option name="dataType" default="Intelligent Guess (xml, json, script, or html)" type="String">
|
|
67 | 76 | </li>
|
68 | 77 | </ul></desc>
|
69 | 78 | </option>
|
70 |
| - <option name="error(jqXHR, textStatus, errorThrown)" type="Function"> |
| 79 | + <option name="error" type="Function"> |
| 80 | + <argument name="jqXHR" type="jqXHR" /> |
| 81 | + <argument name="textStatus" type="String" /> |
| 82 | + <argument name="errorThrown" type="String" /> |
71 | 83 | <desc>A function to be called if the request fails. The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides <code>null</code>) are <code>"timeout"</code>, <code>"error"</code>, <code>"abort"</code>, and <code>"parsererror"</code>. When an HTTP error occurs, <code>errorThrown</code> receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." <strong>As of jQuery 1.5</strong>, the <code>error</code> setting can accept an array of functions. Each function will be called in turn. <strong>Note:</strong> <em>This handler is not called for cross-domain script and JSONP requests.</em> This is an <a href='http://docs.jquery.com/Ajax_Events'>Ajax Event</a>. </desc>
|
72 | 84 | </option>
|
73 | 85 | <option default="true" name="global" type="Boolean">
|
|
113 | 125 | <p>If the request is successful, the status code functions take the same parameters as the success callback; if it results in an error, they take the same parameters as the <code>error</code> callback.</p>
|
114 | 126 | </desc>
|
115 | 127 | </option>
|
116 |
| - <option name="success(data, textStatus, jqXHR)" type="Function, Array"> |
| 128 | + <option name="success" type="Function"> |
| 129 | + <argument name="data" type="Object" /> |
| 130 | + <argument name="textStatus" type="String" /> |
| 131 | + <argument name="jqXHR" type="jqXHR" /> |
117 | 132 | <desc>A function to be called if the request succeeds. The function gets passed three arguments: The data returned from the server, formatted according to the <code>dataType</code> parameter; a string describing the status; and the <code>jqXHR</code> (in jQuery 1.4.x, XMLHttpRequest) object. <strong>As of jQuery 1.5</strong>, <em>the success setting can accept an array of functions. Each function will be called in turn.</em> This is an <a href='http://docs.jquery.com/Ajax_Events'>Ajax Event</a>.</desc>
|
118 | 133 | </option>
|
119 | 134 | <option name="timeout" type="Number">
|
|
0 commit comments