aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax.js
Commit message (Collapse)AuthorAgeFilesLines
...
* Makes sure all converters keys are lowercased before any conversion is ↵jaubourg2011-01-311-1/+12
| | | | taking place: dataTypes' names are now truly case insensitive. Unit test edited.
* Makes sure options.context is used as the context for global ajax events ↵jaubourg2011-01-311-2/+6
| | | | only if it's a DOM node.
* Fixes #7568. Follow-up fix for #5862. Objects with a length property weren't ↵Anton M2011-01-311-3/+3
| | | | serialized properly by jQuery.param.
* Ensures dataTypeExpressions are lowercased for prefilters and transports ↵jaubourg2011-01-311-2/+2
| | | | registrations.
* Compatibility fixes in ajax: exceptions are no longer promoted to strings ↵jaubourg2011-01-281-3/+3
| | | | before being given to callbacks. Updated misleading comment in conversion code.
* Actually does what ↵jaubourg2011-01-271-1/+1
| | | | https://github.com/jquery/jquery/commit/bab8079593913dbc689404aa4e83c46b9b4c9355 promised: passes the jXHR as the third argument of prefilters and transport factories. Comitted for completness even if if backs this out in the end and only land in 1.5.1.
* Passes jXHR object as third argument of prefilters and transport factories.jaubourg2011-01-261-5/+5
|
* Fixes #5866. Issue number in previous commit was wrong both in comments and ↵jaubourg2011-01-261-1/+1
| | | | commit message. See https://github.com/jquery/jquery/commit/0e5b341cc0f3f9bf0f6659e09704f2267cfdfdba for previous commit.
* Fixes #5856. Adds document protocol at the beginning of URLs without ↵jaubourg2011-01-261-11/+8
| | | | protocol (thanks go to skrings for the initial pull request). Simplifies cross-domain detection regexp and logic as a consequence. Also took the opportunity to remove an unused variable. Unit test added.
* Reworks how values of parameters passed to error callbacks are determined. ↵jaubourg2011-01-251-6/+16
| | | | Fixes #8050.
* Makes prefilters and transport inspection more robust and uses better ↵jaubourg2011-01-241-19/+23
| | | | variable names for readability.
* Revised internal implementation of ajaxPrefilter() and ajaxTransport(). ↵jaubourg2011-01-231-103/+80
| | | | Everything is shorter and more efficient now. Also fixes a couple spacing issues that remained.
* More code style fixes.jaubourg2011-01-231-7/+7
|
* Apply JQuery Core Style Guidelines to ajax.js and ajax/*.js,jaubourg2011-01-231-121/+117
|
* Re-organizes ajax.js: prefilters and transports are no longer stored in ↵jaubourg2011-01-221-314/+261
| | | | ajaxSettings (their structure is not handled correctly by extend() and was causing some overhead when constructing the final options map in ajax()); base function for ajaxPrefilter and ajaxTransport has been renamed and split in two (one for inspection, one for addition); response/dataType determination and data conversion logics have been externalized from the ajax() internal callback; data conversion no longer sets responseXXX fields; some minor re-formatting and simplifications.
* Replaces "text in-between" technique with a full-fledged one-level ↵jaubourg2011-01-211-40/+65
| | | | transitive search for converters (unit tests added). Also cleans up auto dataType determination and adds converter checks in order to guess the best dataType possible.
* Moves determineResponse logic into main ajax callback. Puts responseXXX ↵jaubourg2011-01-201-76/+72
| | | | fields definitions into ajaxSettings.
* Renames Deferred's fire and fireReject methods as resolveWith and rejectWith ↵jaubourg2011-01-201-3/+3
| | | | respectively.
* Renames determineDataType as determineResponse. Makes it more generic as a ↵jaubourg2011-01-201-16/+15
| | | | first step into integrating the logic into the main ajax done callback. Also fixes some comments in ajax/xhr.js.
* Revises the way arguments are handled in ajax.jaubourg2011-01-201-7/+6
|
* Makes sure statusCode callbacks are ordered in the same way success and ↵jaubourg2011-01-201-4/+4
| | | | error callbacks are. Unit tests added.
* Cleans up and simplifies code shared by ajaxPrefilter and ajaxTransport. ↵jaubourg2011-01-201-110/+91
| | | | Removes chainability of ajaxSetup, ajaxPrefilter and ajaxTransport. Also makes sure context is handled properly by ajaxSetup (unit test added).
* Moves things around to make jsLint happier.jaubourg2011-01-191-2/+2
|
* Fixes crossDomain test so that it assumes port to be 80 for http and 443 for ↵jaubourg2011-01-191-2/+4
| | | | https when it is not provided.
* Moves determineDataType into ajaxSettings so that it is accessible to ↵jaubourg2011-01-191-48/+50
| | | | transports without the need for a second argument and so that we can now pass the original options to the transport instead. Also ensures the original options are actually propagated to prefilters (they were not).
* Re-adds hastily removed variable and simplifies statusCode based callbacks ↵jaubourg2011-01-191-15/+16
| | | | handling.
* Use undefined instead of 0 to deference transport for clarity.jaubourg2011-01-191-1/+1
|
* Removes unnecessary test and ensures getResponseHeader returns null if the ↵jaubourg2011-01-191-12/+7
| | | | header does not exist.
* Revised how context is determined and removed unnecessary "parameter as ↵jaubourg2011-01-191-12/+10
| | | | variable" trick.
* Moved ajaxSettings.xhr definition together with support.ajax and ↵jaubourg2011-01-191-32/+0
| | | | support.cors determination into ajax/xhr.js.
* Makes it so a prefilter can change the type of a request.jaubourg2011-01-161-7/+7
|
* Removed internal dataTypes option and added headers & crossDomain options ↵jaubourg2011-01-161-1/+2
| | | | into commented out options of ajaxSettings.
* Fixes #2994. Not finding a transport now fires the error callbacks and ↵jaubourg2011-01-161-65/+77
| | | | doesn't make ajax return false. Had to revise how jsonp and script prefilters & transports work (better separation of concerns). Also took the opportunity to revise jXHR getRequestHeader and abort methods and enabled early transport garbage collection when the request completes.
* Moved jQuery.ajax.prefilter and jQuery.ajax.transport to ↵jaubourg2011-01-131-6/+7
| | | | jQuery.ajaxPrefilter and jQuery.ajaxTransport so that proxying the ajax method doesn't turn into a nightmare. Thanks go to scott_gonzalez and DaveMethvin for pointing out the issue. Also made ajaxSetup return "this" to enable chainable definitions -- jQuery.ajaxSetup(...).ajaxPrefilter(...).ajaxTransport(...).
* Fixes #4964. Adds a statusCode object together with a new statusCode method ↵jaubourg2011-01-131-0/+27
| | | | on the jXHR object (deferred behaviour). They accept a map of statusCode/callback(s). Callbacks are fired when the status code of the response correponds to the key (as a success or an error callback depending on how the request completed). Unit tests added.
* Cleans up statusText handling and simplifies 304 notmodified logic.jaubourg2011-01-131-13/+17
|
* Removes unnecessary variables and adds much needed comments into the data ↵jaubourg2011-01-131-6/+28
| | | | conversion logic in ajax.
* Fixes a regression by calling dataFilter with the second argument set as the ↵jaubourg2011-01-131-1/+1
| | | | dataType.
* Gets rid of a var statement by moving variable declarations up.jaubourg2011-01-131-3/+4
|
* AjaxSetup now uses deep extend internally to accomodate map structured options.jaubourg2011-01-121-1/+1
|
* Fixes 4825. jQuery.fn.load: use the jXHR's Promise interface to get the ↵jaubourg2011-01-111-5/+13
| | | | actual response in case ajaxSettings contains a dataFilter. Unit test added.
* Change embedded regexp to a variable (for #6876).Dave Methvin2011-01-091-2/+3
|
* Make it so prefilters get access to the original settings.jaubourg2011-01-091-1/+1
|
* Fixes #5955. Option crossDomain now forces ajax to consider a request as ↵jaubourg2011-01-091-6/+9
| | | | cross-domain even when it is not. Useful for when servers issue redirects to cross-domain urls. Unit test added.
* Make sure prefilters have been called and transport has been selected before ↵jaubourg2011-01-091-3/+3
| | | | sending any global event (in case the "global" option has been changed).
* Fixes #7465. Reworked the regexp and associated test for cross-domain ↵jaubourg2011-01-091-2/+7
| | | | detection so that it now includes ports. Added cross-domain detection tests for protocol, hostname and port.
* Fixes #7868. ResponseText is now properly propagated for error callbacks.jaubourg2011-01-091-0/+5
|
* Fixes #7881. Setting contentType to false will prevent the Content-Type ↵jaubourg2011-01-091-1/+1
| | | | header from being sent. Unit test added.
* Renamed "complete" to "done" in order to avoid conflicts with jXHR.complete.jaubourg2011-01-061-2/+2
|
* Cleaning up trailing whitespace again.Colin Snover2011-01-051-122/+122
|