1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-02 04:10:20 +02:00

Send POST body on asyncRequest

This commit is contained in:
Uwe L. Korn
2014-01-26 15:51:58 +00:00
parent dce99fef75
commit 282b01092c

View File

@@ -36,7 +36,7 @@ if ((typeof Tomahawk === "undefined") || (Tomahawk === null)) {
}; };
} }
Tomahawk.apiVersion = "0.2.0"; Tomahawk.apiVersion = "0.2.1";
/** /**
* Compares versions strings * Compares versions strings
@@ -283,6 +283,7 @@ Tomahawk.syncRequest = function (url, extraHeaders, options) {
* - username: The username for HTTP Basic Auth * - username: The username for HTTP Basic Auth
* - password: The password for HTTP Basic Auth * - password: The password for HTTP Basic Auth
* - errorHandler: callback called if the request was not completed * - errorHandler: callback called if the request was not completed
* - data: body data included in POST requests
*/ */
Tomahawk.asyncRequest = function (url, callback, extraHeaders, options) { Tomahawk.asyncRequest = function (url, callback, extraHeaders, options) {
// unpack 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; Tomahawk.sha256 = Tomahawk.sha256 || CryptoJS.SHA256;