auto-send Content-Type header if using JSON.stringify as serialize in m.request

This commit is contained in:
Leo Horie 2014-06-26 16:32:05 -04:00
parent 6bca818f34
commit f46b8c9238
3 changed files with 16 additions and 2 deletions

View file

@ -85,6 +85,10 @@ mock.window = new function() {
}
window.XMLHttpRequest = new function() {
var request = function() {
this.$headers = {}
this.setRequestHeader = function(key, value) {
this.$headers[key] = value
}
this.open = function(method, url) {
this.method = method
this.url = url