Comparing version 1.2.7 to 1.2.8
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import { Agent } from 'https'; | ||
@@ -26,2 +25,3 @@ export declare class GaxiosError<T = any> extends Error { | ||
baseUrl?: string; | ||
baseURL?: string; | ||
method?: 'GET' | 'HEAD' | 'POST' | 'DELETE' | 'PUT' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH'; | ||
@@ -28,0 +28,0 @@ headers?: Headers; |
@@ -112,4 +112,6 @@ "use strict"; | ||
} | ||
if (opts.baseUrl) { | ||
opts.url = (new url_1.URL(opts.url, opts.baseUrl)).toString(); | ||
// baseUrl has been deprecated, remove in 2.0 | ||
const baseUrl = opts.baseUrl || opts.baseURL; | ||
if (baseUrl) { | ||
opts.url = baseUrl + opts.url; | ||
} | ||
@@ -116,0 +118,0 @@ opts.headers = opts.headers || {}; |
{ | ||
"name": "gaxios", | ||
"version": "1.2.7", | ||
"version": "1.2.8", | ||
"description": "A simple common HTTP client specifically for Google APIs and services.", | ||
@@ -47,3 +47,3 @@ "main": "build/src/index.js", | ||
"source-map-support": "^0.5.6", | ||
"typescript": "~3.2.0" | ||
"typescript": "~3.3.0" | ||
}, | ||
@@ -50,0 +50,0 @@ "dependencies": { |
@@ -30,3 +30,3 @@ # gaxios | ||
gaxios.instances.defaults = { | ||
baseUrl: 'https://example.com' | ||
baseURL: 'https://example.com' | ||
headers: { | ||
@@ -50,3 +50,3 @@ Authorization: 'SOME_TOKEN' | ||
// The base Url to use for the request. Prepended to the `url` property above. | ||
baseUrl: 'https://example.com'; | ||
baseURL: 'https://example.com'; | ||
@@ -53,0 +53,0 @@ // The HTTP methods to be sent with the request. |
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
45771
518