@digitalbazaar/http-client
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -12,5 +12,5 @@ /*! | ||
// methods to proxy from ky | ||
const PROXY_METHODS = [ | ||
const PROXY_METHODS = new Set([ | ||
'get', 'post', 'put', 'push', 'patch', 'head', 'delete' | ||
]; | ||
]); | ||
@@ -49,2 +49,6 @@ /** | ||
const ky = await kyPromise; | ||
const method = ((args[1] && args[1].method) || 'get').toLowerCase(); | ||
if(PROXY_METHODS.has(method)) { | ||
return httpClient[method].apply(ky[method], args); | ||
} | ||
return ky.apply(ky, args); | ||
@@ -56,3 +60,3 @@ } | ||
const ky = await kyPromise; | ||
return _handleResponse(ky, ky, args); | ||
return _handleResponse(ky[method], ky, args); | ||
}; | ||
@@ -59,0 +63,0 @@ } |
{ | ||
"name": "@digitalbazaar/http-client", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "An opinionated, isomorphic HTTP client.", | ||
@@ -5,0 +5,0 @@ "license": "BSD-3-Clause", |
Sorry, the diff of this file is not supported yet
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
257
0
15477
6