@libj/http-meta
Advanced tools
Comparing version 0.0.15 to 0.0.16
@@ -22,3 +22,3 @@ "use strict"; | ||
var _b = _a === void 0 ? {} : _a, headers = _b.headers, body = _b.body; | ||
var _this = _super.call(this, msg(status, body)) || this; | ||
var _this = _super.call(this, msg(status)) || this; | ||
_this.body = {}; | ||
@@ -38,9 +38,10 @@ _this.headers = {}; | ||
/*** Lib ***/ | ||
function msg(status, body) { | ||
function msg(status) { | ||
validateStatus(status); | ||
var res = status + " " + httpStatusText_1.httpStatusText(status); | ||
if (body) { | ||
res += ": " + JSON.stringify(body); | ||
} | ||
return res; | ||
return status + " " + httpStatusText_1.httpStatusText(status); | ||
// TODO: this one fails for circular JSON returned by axios | ||
// if (body) { | ||
// res += `: ${JSON.stringify(body)}`; | ||
// } | ||
// return res; | ||
} | ||
@@ -47,0 +48,0 @@ function validateStatus(status) { |
{ | ||
"dependencies": {}, | ||
"name": "@libj/http-meta", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"description": "Http meta kit", | ||
@@ -24,3 +24,3 @@ "author": "Sergey Poskachey <seregynp@gmail.com>", | ||
], | ||
"gitHead": "8bb5c53b92b1569b30d329e8594dda364d5eefd4" | ||
"gitHead": "0a6a9095b97de86372fb2b30d3865fefeee26327" | ||
} |
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
503
35325