diff --git a/lib/OAuth2Client.js b/lib/OAuth2Client.js index 3738ef9..a926bab 100644 --- a/lib/OAuth2Client.js +++ b/lib/OAuth2Client.js @@ -474,9 +474,11 @@ class OAuth2Client extends EventEmitter { opts.body = body; } - let url = `${this._apiUrl}${path}${urlAppend}`; + let url; if (path.startsWith('http://') || path.startsWith('https://')) { - url = `${path}${urlAppend}`; + url = `${path}${urlAppend}`; // Allow the use of absolute URLs to ignore this._apiUrl + } else { + url = `${this._apiUrl}${path}${urlAppend}`; } return {