Comparing version 1.8.0 to 1.8.1
@@ -125,2 +125,11 @@ "use strict"; | ||
} | ||
const parsedUrl = new URL(opts.url); | ||
opts.url = `${parsedUrl.origin}${parsedUrl.pathname}`; | ||
opts.params = extend(qs.parse(parsedUrl.search.substr(1)), // removes leading ? | ||
opts.params); | ||
opts.paramsSerializer = opts.paramsSerializer || this.paramsSerializer; | ||
if (opts.params) { | ||
parsedUrl.search = opts.paramsSerializer(opts.params); | ||
} | ||
opts.url = parsedUrl.href; | ||
if (typeof options.maxContentLength === 'number') { | ||
@@ -146,3 +155,2 @@ opts.size = options.maxContentLength; | ||
opts.validateStatus = opts.validateStatus || this.validateStatus; | ||
opts.paramsSerializer = opts.paramsSerializer || this.paramsSerializer; | ||
opts.responseType = opts.responseType || 'json'; | ||
@@ -153,7 +161,2 @@ if (!opts.headers['Accept'] && opts.responseType === 'json') { | ||
opts.method = opts.method || 'GET'; | ||
if (opts.params) { | ||
const parts = new URL(opts.url); | ||
parts.search = opts.paramsSerializer(opts.params); | ||
opts.url = parts.href; | ||
} | ||
const proxy = loadProxy(); | ||
@@ -160,0 +163,0 @@ if (proxy) { |
{ | ||
"name": "gaxios", | ||
"version": "1.8.0", | ||
"version": "1.8.1", | ||
"description": "A simple common HTTP client specifically for Google APIs and services.", | ||
@@ -5,0 +5,0 @@ "main": "build/src/index.js", |
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
50918
590