Skip to content

Commit

Permalink
Merge pull request #8 from Financial-Times/content-type
Browse files Browse the repository at this point in the history
safer writing of content-type header
  • Loading branch information
matthew-andrews committed May 5, 2015
2 parents cb5bebb + 6da5a60 commit 280ae3c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/poller.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ var Poller = function(config) {

this.options.headers = this.options.headers || {};

if (!this.options.headers.Accept) {
if (!this.options.headers['Content-Type']) {
this.options.headers['Content-Type'] = 'application/json';
}
if (!this.options.headers.Accept) {
this.options.headers['Accept'] = 'application/json';
}

Expand Down

0 comments on commit 280ae3c

Please sign in to comment.