mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Send a http post request for validating login (bug 390815)
This commit is contained in:
parent
f23a8dc1c5
commit
9cc1318074
@ -107,6 +107,17 @@ var qaTools = {
|
||||
alert(e);
|
||||
}
|
||||
},
|
||||
httpPostRequest : function (url, data, callback, errback) {
|
||||
// do a xmlhttprequest sending data with the post method
|
||||
var req = getXMLHttpRequest();
|
||||
req.open("POST", url, true);
|
||||
req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
||||
req.setRequestHeader("Content-length", data.length);
|
||||
req.setRequestHeader("Connection", "close");
|
||||
req = sendXMLHttpRequest(req, data);
|
||||
req.addErrback(errback);
|
||||
req.addCallback(callback);
|
||||
},
|
||||
showHideLoadingMessage : function(box, bool) {
|
||||
if (bool == true) { // show
|
||||
var loading = document.createElementNS("http://www.w3.org/1999/xhtml", "p");
|
||||
|
@ -130,13 +130,12 @@
|
||||
},
|
||||
|
||||
validateLogin : function(uname, passwd, callback) {
|
||||
var req = doSimpleXMLHttpRequest(litmus.baseURL+'json.cgi', {
|
||||
validate_login: 1,
|
||||
username: uname,
|
||||
password: passwd
|
||||
var qs = queryString({
|
||||
validate_login: 1,
|
||||
username: uname,
|
||||
password: passwd
|
||||
});
|
||||
req.addErrback(callback);
|
||||
req.addCallback(callback);
|
||||
qaTools.httpPostRequest(litmus.baseURL+'json.cgi', qs, callback);
|
||||
},
|
||||
createAccount : function() {
|
||||
alert("XXX: not implemented");
|
||||
|
Loading…
Reference in New Issue
Block a user