Comparing version 1.0.2 to 1.0.3
@@ -107,4 +107,4 @@ "use strict"; | ||
*/ | ||
validateOpts(opts) { | ||
opts = extend({}, this.defaults, opts); | ||
validateOpts(options) { | ||
const opts = extend(true, {}, this.defaults, options); | ||
if (!opts.url) { | ||
@@ -121,2 +121,5 @@ throw new Error('URL is required.'); | ||
opts.responseType = opts.responseType || 'json'; | ||
if (!opts.headers['Accept'] && opts.responseType === 'json') { | ||
opts.headers['Accept'] = 'application/json'; | ||
} | ||
opts.method = opts.method || 'GET'; | ||
@@ -123,0 +126,0 @@ if (opts.params) { |
{ | ||
"name": "gaxios", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"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
42702
480