mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Ignore request body for XHR GET requests.
Raises an error on Android. Caused by the Angular XHR backend sending an empty string.
This commit is contained in:
@@ -212,6 +212,14 @@ export var test_XMLHttpRequest_requestShouldBePossibleAfterAbort = function (don
|
||||
xhr.send(JSON.stringify({ MyVariableOne: "ValueOne", MyVariableTwo: "ValueTwo" }));
|
||||
};
|
||||
|
||||
export function test_ignore_zero_length_request_body(done) {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", "https://httpbin.org/get");
|
||||
|
||||
xhr.send('');
|
||||
done(null);
|
||||
}
|
||||
|
||||
export function test_raises_onload_Event(done) {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.onload = () => {
|
||||
|
||||
Reference in New Issue
Block a user