Lines Matching refs:xhr

4952 		xhr: window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ?
5102 var xhr = s.xhr();
5104 if ( !xhr ) {
5111 xhr.open(type, s.url, s.async, s.username, s.password);
5113 xhr.open(type, s.url, s.async);
5120 xhr.setRequestHeader("Content-Type", s.contentType);
5126 xhr.setRequestHeader("If-Modified-Since", jQuery.lastModified[s.url]);
5130 xhr.setRequestHeader("If-None-Match", jQuery.etag[s.url]);
5137 xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
5141 xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ?
5147 if ( s.beforeSend && s.beforeSend.call(callbackContext, xhr, s) === false ) {
5154 xhr.abort();
5159 trigger("ajaxSend", [xhr, s]);
5163 var onreadystatechange = xhr.onreadystatechange = function( isTimeout ) {
5165 if ( !xhr || xhr.readyState === 0 || isTimeout === "abort" ) {
5173 if ( xhr ) {
5174 xhr.onreadystatechange = jQuery.noop;
5178 } else if ( !requestDone && xhr && (xhr.readyState === 4 || isTimeout === "timeout") ) {
5180 xhr.onreadystatechange = jQuery.noop;
5184 !jQuery.httpSuccess( xhr ) ?
5186 s.ifModified && jQuery.httpNotModified( xhr, s.url ) ?
5196 data = jQuery.httpData( xhr, s.dataType, s );
5210 jQuery.handleError(s, xhr, status, errMsg);
5217 xhr.abort();
5222 xhr = null;
5230 var oldAbort = xhr.abort;
5231 xhr.abort = function() {
5232 if ( xhr ) {
5233 oldAbort.call( xhr );
5244 if ( xhr && !requestDone ) {
5252 xhr.send( type === "POST" || type === "PUT" || type === "DELETE" ? s.data : null );
5254 jQuery.handleError(s, xhr, null, e);
5267 s.success.call( callbackContext, data, status, xhr );
5272 trigger( "ajaxSuccess", [xhr, s] );
5279 s.complete.call( callbackContext, xhr, status);
5284 trigger( "ajaxComplete", [xhr, s] );
5298 return xhr;
5301 handleError: function( s, xhr, status, e ) { argument
5304 s.error.call( s.context || s, xhr, status, e );
5309 (s.context ? jQuery(s.context) : jQuery.event).trigger( "ajaxError", [xhr, s, e] );
5317 httpSuccess: function( xhr ) { argument
5320 return !xhr.status && location.protocol === "file:" ||
5322 ( xhr.status >= 200 && xhr.status < 300 ) ||
5323 xhr.status === 304 || xhr.status === 1223 || xhr.status === 0;
5330 httpNotModified: function( xhr, url ) { argument
5331 var lastModified = xhr.getResponseHeader("Last-Modified"),
5332 etag = xhr.getResponseHeader("Etag");
5343 return xhr.status === 304 || xhr.status === 0;
5346 httpData: function( xhr, type, s ) { argument
5347 var ct = xhr.getResponseHeader("content-type") || "",
5349 data = xml ? xhr.responseXML : xhr.responseText;