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:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user