mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-01-18 23:17:59 +01:00
Send POST body on asyncRequest
This commit is contained in:
parent
dce99fef75
commit
282b01092c
@ -36,7 +36,7 @@ if ((typeof Tomahawk === "undefined") || (Tomahawk === null)) {
|
||||
};
|
||||
}
|
||||
|
||||
Tomahawk.apiVersion = "0.2.0";
|
||||
Tomahawk.apiVersion = "0.2.1";
|
||||
|
||||
/**
|
||||
* Compares versions strings
|
||||
@ -283,6 +283,7 @@ Tomahawk.syncRequest = function (url, extraHeaders, options) {
|
||||
* - username: The username for HTTP Basic Auth
|
||||
* - password: The password for HTTP Basic Auth
|
||||
* - errorHandler: callback called if the request was not completed
|
||||
* - data: body data included in POST requests
|
||||
*/
|
||||
Tomahawk.asyncRequest = function (url, callback, extraHeaders, options) {
|
||||
// unpack options
|
||||
@ -307,7 +308,7 @@ Tomahawk.asyncRequest = function (url, callback, extraHeaders, options) {
|
||||
}
|
||||
}
|
||||
};
|
||||
xmlHttpRequest.send(null);
|
||||
xmlHttpRequest.send(opt.data || null);
|
||||
};
|
||||
|
||||
Tomahawk.sha256 = Tomahawk.sha256 || CryptoJS.SHA256;
|
||||
|
Loading…
x
Reference in New Issue
Block a user