Permalink
Browse files

fix(rest): check for ['Content-Type'] and ['content-type']

  • Loading branch information...
doktordirk committed Jun 3, 2016
1 parent 61acce8 commit 8c87af2e80fd84f6c201de823e8f443f22305a44
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/rest.js
@@ -34,7 +34,7 @@ export class Rest {
request(method, path, body, options = {}) {
let requestOptions = extend(true, {headers: {}}, this.defaults, options, {method, body});

let contentType = requestOptions.headers['Content-Type'];
let contentType = requestOptions.headers['Content-Type'] || requestOptions.headers['content-type'];

if (typeof body === 'object' && contentType) {
requestOptions.body = contentType.toLowerCase() === 'application/json'

0 comments on commit 8c87af2

Please sign in to comment.