dont send data body if it is empty
This commit is contained in:
parent
6efb2ac449
commit
1fc82577b1
|
@ -161,7 +161,11 @@ export default Ember.Service.extend({
|
||||||
if (typeof options.data === "object" && (Ember.isNone(options.contentType) || options.contentType.match(/application\/json/))) {
|
if (typeof options.data === "object" && (Ember.isNone(options.contentType) || options.contentType.match(/application\/json/))) {
|
||||||
data = JSON.stringify(data);
|
data = JSON.stringify(data);
|
||||||
}
|
}
|
||||||
|
if (data) {
|
||||||
xhr.send(data);
|
xhr.send(data);
|
||||||
|
} else {
|
||||||
|
xhr.send();
|
||||||
|
}
|
||||||
return promise;
|
return promise;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user