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:
Hristo Deshev
2015-10-17 19:04:00 +03:00
parent 2f92cb3ff4
commit 75796ea14c
2 changed files with 12 additions and 1 deletions

View File

@@ -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 = () => {