]> source.dussan.org Git - jquery.git/commitdiff
Adds support for username and password to $.ajax
authorYehuda Katz <wycats@gmail.com>
Mon, 7 Jan 2008 01:03:31 +0000 (01:03 +0000)
committerYehuda Katz <wycats@gmail.com>
Mon, 7 Jan 2008 01:03:31 +0000 (01:03 +0000)
src/ajax.js

index 94e022832f32d99618266266ea07901866c03ba2..58c6b9b3c95be575db7896a626d7dc52c94fa2d8 100644 (file)
@@ -144,7 +144,9 @@ jQuery.extend({
                contentType: "application/x-www-form-urlencoded",
                processData: true,
                async: true,
-               data: null
+               data: null,
+               username: null,
+               password: null
        },
        
        // Last-Modified header cache for next request
@@ -258,7 +260,7 @@ jQuery.extend({
                var xml = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
 
                // Open the socket
-               xml.open(s.type, s.url, s.async);
+               xml.open(s.type, s.url, s.async, s.username, s.password);
 
                // Need an extra try/catch for cross domain requests in Firefox 3
                try {