@lifeomic/axios-fetch
Advanced tools
Comparing version 1.5.1 to 1.5.2
{ | ||
"name": "@lifeomic/axios-fetch", | ||
"version": "1.5.1", | ||
"version": "1.5.2", | ||
"description": "A WebAPI Fetch implementation backed by an Axios client", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -24,5 +24,4 @@ const { Response, Headers } = require('node-fetch'); | ||
method: init.method || 'GET', | ||
data: init.body instanceof FormData ? init.body : String(init.body), | ||
data: typeof init.body === 'undefined' || init.body instanceof FormData ? init.body : String(init.body), | ||
headers: lowerCasedHeaders, | ||
validateStatus: () => true, | ||
// Force the response to an arraybuffer type. Without this, the Response | ||
@@ -35,3 +34,8 @@ // object will try to guess the content type and add headers that weren't in | ||
const result = await axios.request(config); | ||
let result; | ||
try { | ||
result = await axios.request(config); | ||
} catch (err) { | ||
result = err.response; | ||
} | ||
@@ -38,0 +42,0 @@ const headers = new Headers(result.headers); |
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
8280
49