mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Adds support for username and password to $.ajax
This commit is contained in:
parent
948753842b
commit
b91eef070d
@ -144,7 +144,9 @@ jQuery.extend({
|
|||||||
contentType: "application/x-www-form-urlencoded",
|
contentType: "application/x-www-form-urlencoded",
|
||||||
processData: true,
|
processData: true,
|
||||||
async: true,
|
async: true,
|
||||||
data: null
|
data: null,
|
||||||
|
username: null,
|
||||||
|
password: null
|
||||||
},
|
},
|
||||||
|
|
||||||
// Last-Modified header cache for next request
|
// Last-Modified header cache for next request
|
||||||
@ -258,7 +260,7 @@ jQuery.extend({
|
|||||||
var xml = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
|
var xml = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
|
||||||
|
|
||||||
// Open the socket
|
// 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
|
// Need an extra try/catch for cross domain requests in Firefox 3
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user