Comparing version 0.5.0 to 0.5.1
@@ -15,4 +15,4 @@ var fetch = require('./fetch-browser') | ||
module.exports = { | ||
loadFile, | ||
saveFile | ||
loadFile: loadFile, | ||
saveFile: saveFile | ||
} |
@@ -105,3 +105,3 @@ var fetchImpl = require('./adapter/fetch-node') | ||
var opts = JSON.parse(optionsBuffer.toString()) | ||
if (opts.headers['content-type'] && opts.headers['content-type'][0].startsWith('application/json')) { | ||
if (opts.headers && opts.headers['content-type'] && opts.headers['content-type'][0] && /^application\/json/.test(opts.headers['content-type'][0])) { | ||
// Check that the JSON is parseable | ||
@@ -175,3 +175,3 @@ // There is an odd thing that happens for api.github.com/search/repositories?q=github | ||
// Cached version does not exist | ||
debug(url, 'cached version not found') | ||
debug(url, 'cached version not found because', err.message) | ||
if (CONFIGURATION.mode === 'cache') { | ||
@@ -178,0 +178,0 @@ debug(url, 'making network request') |
{ | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"name": "fetch-vcr", | ||
@@ -4,0 +4,0 @@ "description": "Stop mocking HTTP Requests. Just record and then play them back", |
100039