Skip to content
Permalink
Browse files

Fixes #8146 by introducing the xhrFields option with is a map of fiel…

…dName/fieldValue to set on the native xhr. Can be used to set withCredentials to true for cross-domain requests if needed.
  • Loading branch information...
jaubourg committed Feb 2, 2011
1 parent e3cc440 commit 5ef7ddc4c55f49cb7767bba99975f2c7ea5422d9
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/ajax/xhr.js
@@ -82,7 +82,15 @@ if ( jQuery.support.ajax ) {

// Get a new xhr
var xhr = s.xhr(),
handle;
handle,
i;

// Apply custom fields if provided
if ( s.xhrFields ) {
for ( i in s.xhrFields ) {
xhr[ i ] = s.xhrFields[ i ];
}
}

// Open the socket
// Passing null username, generates a login popup on Opera (#2865)

0 comments on commit 5ef7ddc

Please sign in to comment.
You can’t perform that action at this time.