Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
fix(rest): check for ['Content-Type'] and ['content-type']
Browse files Browse the repository at this point in the history
  • Loading branch information
doktordirk committed Jun 3, 2016
1 parent 61acce8 commit 8c87af2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 8c87af2

Please sign in to comment.