Comparing version 2.0.0-next.8 to 2.0.0-next.9
function apply(src, tar) { | ||
tar.headers = src.headers || new Headers; | ||
tar.statusMessage = src.statusText; | ||
@@ -46,2 +45,3 @@ tar.statusCode = src.status; | ||
} catch (err) { | ||
err.headers = rr.headers; | ||
apply(rr, err); | ||
@@ -48,0 +48,0 @@ rej(err); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.httpie={})}(this,(function(e){function t(e,t){t.headers=e.headers||new Headers,t.statusMessage=e.statusText,t.statusCode=e.status,t.data=e.body}function n(e,n,o){var i,a,s;return(o=o||{}).method=e,o.headers=o.headers||{},o.body&&"object"==typeof o.body&&(o.headers["content-type"]="application/json",o.body=JSON.stringify(o.body)),o.withCredentials&&(o.credentials="include"),o.timeout&&(s=new AbortController,o.signal=s.signal,i=setTimeout(s.abort,o.timeout)),new Promise((e,d)=>{fetch(n,o).then((n,s)=>{clearTimeout(i),t(n,n),s=n.status>=400?d:e,(a=n.headers.get("content-type"))&&~a.indexOf("application/json")?n.text().then(e=>{try{n.data=JSON.parse(e,o.reviver),s(n)}catch(e){t(n,e),d(e)}}):s(n)}).catch(e=>{e.timeout=s&&s.signal.aborted,d(e)})})}var o=n.bind(n,"GET"),i=n.bind(n,"POST"),a=n.bind(n,"PATCH"),s=n.bind(n,"DELETE"),d=n.bind(n,"PUT");e.del=s,e.get=o,e.patch=a,e.post=i,e.put=d,e.send=n})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.httpie={})}(this,(function(e){function t(e,t){t.statusMessage=e.statusText,t.statusCode=e.status,t.data=e.body}function n(e,n,o){var i,a,s;return(o=o||{}).method=e,o.headers=o.headers||{},o.body&&"object"==typeof o.body&&(o.headers["content-type"]="application/json",o.body=JSON.stringify(o.body)),o.withCredentials&&(o.credentials="include"),o.timeout&&(s=new AbortController,o.signal=s.signal,i=setTimeout(s.abort,o.timeout)),new Promise((e,d)=>{fetch(n,o).then((n,s)=>{clearTimeout(i),t(n,n),s=n.status>=400?d:e,(a=n.headers.get("content-type"))&&~a.indexOf("application/json")?n.text().then(e=>{try{n.data=JSON.parse(e,o.reviver),s(n)}catch(e){e.headers=n.headers,t(n,e),d(e)}}):s(n)}).catch(e=>{e.timeout=s&&s.signal.aborted,d(e)})})}var o=n.bind(n,"GET"),i=n.bind(n,"POST"),a=n.bind(n,"PATCH"),s=n.bind(n,"DELETE"),d=n.bind(n,"PUT");e.del=s,e.get=o,e.patch=a,e.post=i,e.put=d,e.send=n})); |
{ | ||
"name": "httpie", | ||
"version": "2.0.0-next.8", | ||
"version": "2.0.0-next.9", | ||
"repository": "lukeed/httpie", | ||
@@ -14,3 +14,3 @@ "description": "A lightweight, Promise-based HTTP client for Node.js and the browser~!", | ||
"exports": { | ||
"./": { | ||
".": { | ||
"import": "./node/index.mjs", | ||
@@ -74,4 +74,4 @@ "require": "./node/index.js", | ||
"esm": "3.2.25", | ||
"uvu": "0.0.11" | ||
"uvu": "0.0.17" | ||
} | ||
} |
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
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
9
26093