supra-http
Advanced tools
Comparing version 1.7.0 to 1.8.0
@@ -28,4 +28,9 @@ "use strict"; | ||
if (options && options.json && res.body && res.response.headers["content-type"] && res.response.headers["content-type"].startsWith(enums_1.CONTENT_TYPE.ApplicationJson)) { | ||
res.json = JSON.parse(res.body); | ||
resolve(res); | ||
try { | ||
res.json = JSON.parse(res.body); | ||
resolve(res); | ||
} | ||
catch (error) { | ||
reject(error); | ||
} | ||
} | ||
@@ -32,0 +37,0 @@ else { |
@@ -5,3 +5,3 @@ /// <reference types="node" /> | ||
interface HttpRequestOptions { | ||
method?: 'get' | 'post' | 'delete' | 'put' | 'head'; | ||
method?: 'get' | 'post' | 'delete' | 'put' | 'head' | 'patch'; | ||
body?: string | object; | ||
@@ -8,0 +8,0 @@ form?: string | object; |
{ | ||
"name": "supra-http", | ||
"version": "1.7.0", | ||
"version": "1.8.0", | ||
"description": "Circuit breaking http client for NodeJs. And it is fast...", | ||
@@ -28,4 +28,3 @@ "main": "./dist/index.js", | ||
"fast-url-parser": "^1.1.3", | ||
"opossum": "^4.1.0", | ||
"opossum-hystrix": "0.0.1" | ||
"opossum": "^4.1.0" | ||
}, | ||
@@ -32,0 +31,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
4
22375
23
339
3
- Removedopossum-hystrix@0.0.1
- Removedopossum-hystrix@0.0.1(transitive)