imboclient
Advanced tools
Comparing version 2.0.1 to 2.0.2
{ | ||
"name": "imboclient", | ||
"main": "dist/browser-bundle.js", | ||
"version": "2.0.0", | ||
"version": "2.0.2", | ||
"homepage": "https://github.com/imbo/imboclient-js", | ||
@@ -21,4 +21,8 @@ "authors": [ | ||
"tests", | ||
"examples" | ||
"lib", | ||
"examples", | ||
"Gruntfile.js", | ||
"bower.json", | ||
"index.js" | ||
] | ||
} |
@@ -65,6 +65,3 @@ 'use strict'; | ||
reporter: 'html-cov', | ||
output: 'coverage.html', | ||
coveralls: { | ||
serviceName: 'travis-ci' | ||
} | ||
output: 'coverage.html' | ||
} | ||
@@ -71,0 +68,0 @@ }, |
@@ -80,5 +80,10 @@ /** | ||
// Is this a JSON-request? | ||
if (options.json && typeof options.json !== 'boolean') { | ||
xhr.setRequestHeader('Content-Type', 'application/json'); | ||
options.body = JSON.stringify(options.json); | ||
if (options.json) { | ||
xhr.setRequestHeader('Accept', 'application/json'); | ||
// Do we have a payload to deliver as JSON? | ||
if (typeof options.json !== 'boolean') { | ||
xhr.setRequestHeader('Content-Type', 'application/json'); | ||
options.body = JSON.stringify(options.json); | ||
} | ||
} | ||
@@ -85,0 +90,0 @@ |
{ | ||
"name": "imboclient", | ||
"description": "An Imbo client for node.js and modern browsers", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"author": "Espen Hovlandsdal <espen@hovlandsdal.com>", | ||
@@ -6,0 +6,0 @@ "contributors": [], |
127546
2262