From: Yehuda Katz Date: Mon, 7 Jan 2008 01:03:31 +0000 (+0000) Subject: Adds support for username and password to $.ajax X-Git-Tag: 1.2.2~17 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b91eef070db6ebe1ef7654e24c33d6eb9f0fca80;p=jquery.git Adds support for username and password to $.ajax --- diff --git a/src/ajax.js b/src/ajax.js index 94e022832..58c6b9b3c 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -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 {