@capriza/http-utils
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -53,9 +53,9 @@ var axios = require('axios'); | ||
if (err.response){ | ||
requestLog.error(`[HttpUtils] HTTP ${method} response error: ${err.response.status} ${err.response.statusText} on ${this.baseURL}${url}`); | ||
requestLog.error(`[HttpUtils] HTTP ${method} response error: ${err.response.status} ${err.response.statusText} on ${opts.baseURL || this.baseURL}${url}`); | ||
reject(err.response); | ||
} else if (err.code){ | ||
requestLog.error(`[HttpUtils] HTTP ${method} error: ${err.code} on ${this.baseURL}${url}`); | ||
requestLog.error(`[HttpUtils] HTTP ${method} error: ${err.code} on ${opts.baseURL || this.baseURL}${url}`); | ||
reject(err); | ||
} else { | ||
requestLog.error(`[HttpUtils] HTTP ${method} error: ${err} on ${this.baseURL}${url}`); | ||
requestLog.error(`[HttpUtils] HTTP ${method} error: ${err} on ${opts.baseURL || this.baseURL}${url}`); | ||
reject(err); | ||
@@ -70,3 +70,3 @@ } | ||
if(debug){ | ||
requestLog.info(`[HttpUtils] HTTP ${method} request: ${this.baseURL}${url}`); | ||
requestLog.info(`[HttpUtils] HTTP ${method} request: ${opts.baseURL || this.baseURL}${url}`); | ||
requestLog.info(`[HttpUtils] PRIORITY[${priority}] OPTS: ${JSON.stringify(opts)}`); | ||
@@ -73,0 +73,0 @@ } |
{ | ||
"name": "@capriza/http-utils", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "HTTP Request utils that handles, request-response, errors, concurrency, priority and authentication", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
26779