Lines Matching refs:xhr
3381 xhr:function(){
3510 var xhr = s.xhr();
3515 xhr.open(type, s.url, s.async, s.username, s.password);
3517 xhr.open(type, s.url, s.async);
3523 xhr.setRequestHeader("Content-Type", s.contentType);
3527 xhr.setRequestHeader("If-Modified-Since",
3531 xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
3534 xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ?
3540 if ( s.beforeSend && s.beforeSend(xhr, s) === false ) {
3545 xhr.abort();
3550 jQuery.event.trigger("ajaxSend", [xhr, s]);
3555 if (xhr.readyState == 0) {
3565 } else if ( !requestDone && xhr && (xhr.readyState == 4 || isTimeout == "timeout") ) {
3575 !jQuery.httpSuccess( xhr ) ? "error" :
3576 s.ifModified && jQuery.httpNotModified( xhr, s.url ) ? "notmodified" :
3583 data = jQuery.httpData( xhr, s.dataType, s );
3594 modRes = xhr.getResponseHeader("Last-Modified");
3604 jQuery.handleError(s, xhr, status);
3610 xhr.abort();
3614 xhr = null;
3626 if ( xhr && !requestDone )
3633 xhr.send(s.data);
3635 jQuery.handleError(s, xhr, null, e);
3649 jQuery.event.trigger( "ajaxSuccess", [xhr, s] );
3655 s.complete(xhr, status);
3659 jQuery.event.trigger( "ajaxComplete", [xhr, s] );
3667 return xhr;
3670 handleError: function( s, xhr, status, e ) { argument
3672 if ( s.error ) s.error( xhr, status, e );
3676 jQuery.event.trigger( "ajaxError", [xhr, s, e] );
3683 httpSuccess: function( xhr ) { argument
3686 return !xhr.status && location.protocol == "file:" ||
3687 ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status == 304 || xhr.status == 1223;
3693 httpNotModified: function( xhr, url ) { argument
3695 var xhrRes = xhr.getResponseHeader("Last-Modified");
3698 return xhr.status == 304 || xhrRes == jQuery.lastModified[url];
3703 httpData: function( xhr, type, s ) { argument
3704 var ct = xhr.getResponseHeader("content-type"),
3706 data = xml ? xhr.responseXML : xhr.responseText;