apicase-adapter-fetch
Advanced tools
Comparing version 0.2.2 to 0.2.3
36
index.js
@@ -20,21 +20,23 @@ var pathToRegexp = require('path-to-regexp') | ||
.then(function(res) { | ||
return res[ctx.payload.parser]().then(function (data) { | ||
ctx.resolve({ | ||
success: ctx.payload.validateStatus(res.status), | ||
data: response.body, | ||
error: null, | ||
status: res.status, | ||
statusText: res.statusText | ||
return res[ctx.payload.parser]() | ||
.then(function(data) { | ||
ctx.resolve({ | ||
success: ctx.payload.validateStatus(res.status), | ||
data: response.body, | ||
error: null, | ||
status: res.status, | ||
statusText: res.statusText | ||
}) | ||
}) | ||
}).catch(function (error) { | ||
ctx.reject({ | ||
success: false, | ||
data: response.body, | ||
error: error, | ||
status: res.status, | ||
statusText: res.statusText | ||
.catch(function(error) { | ||
ctx.reject({ | ||
success: false, | ||
data: response.body, | ||
error: error, | ||
status: res.status, | ||
statusText: res.statusText | ||
}) | ||
}) | ||
}) | ||
}) | ||
.catch(function (error) { | ||
.catch(function(error) { | ||
ctx.reject({ | ||
@@ -47,3 +49,3 @@ success: false, | ||
}) | ||
) | ||
}) | ||
}, | ||
@@ -50,0 +52,0 @@ convert(payload) { |
{ | ||
"name": "apicase-adapter-fetch", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "Fetch adapter for Apicase", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40752
84