@capriza/http-utils
Advanced tools
Comparing version 0.2.9 to 0.2.10
@@ -14,2 +14,3 @@ var axios = require('axios'); | ||
super(options); | ||
this.baseURL = options.baseURL || options.baseUrl; | ||
this.retryInterval = (!isNaN(options.retryInterval) && options.retryInterval) || 5000; | ||
@@ -21,5 +22,4 @@ this.maxRetries = (!isNaN(options.maxRetries) && options.maxRetries) || 0; | ||
this.requestQueue = new Queue(options.limit, options.interval, options.maxConcurrent); | ||
this.baseURL = options.baseUrl; | ||
this.http = axios.create(Object.assign(options.requestConfig || {}, { | ||
baseURL: options.baseUrl, | ||
baseURL: this.baseURL, | ||
timeout: this.requestTimeout, | ||
@@ -64,3 +64,3 @@ auth : options.username && options.password && { username : options.username, password : options.password }, | ||
try { | ||
const fullURL = URL.resolve(url, opts.baseURL || this.baseURL || ""); | ||
const fullURL = URL.resolve(opts.baseURL || opts.baseUrl || this.baseURL || "", url); | ||
const objURL = new URL.URL(fullURL); | ||
@@ -67,0 +67,0 @@ var cleanURL = objURL.origin + objURL.pathname + " (without query)" |
{ | ||
"name": "@capriza/http-utils", | ||
"version": "0.2.9", | ||
"version": "0.2.10", | ||
"description": "HTTP Request utils that handles, request-response, errors, concurrency, priority and authentication", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,1 +0,1 @@ | ||
VERSION=0.2.9 | ||
VERSION=0.2.10 |
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
34094