@hqoss/http-client
Advanced tools
Comparing version 0.1.25-0 to 0.1.26-0
@@ -82,7 +82,14 @@ "use strict"; | ||
this.buildUrl = (pathOrUrl) => pathOrUrl instanceof URL ? pathOrUrl : new URL(pathOrUrl, this.baseUrl); | ||
this.combineOpts = (method, reqOpts) => ({ | ||
...this.baseReqOpts, | ||
...reqOpts, | ||
method, | ||
}); | ||
this.combineOpts = (method, reqOpts) => { | ||
var _a; | ||
return ({ | ||
...this.baseReqOpts, | ||
...reqOpts, | ||
headers: { | ||
...(_a = this.baseReqOpts) === null || _a === void 0 ? void 0 : _a.headers, | ||
...reqOpts === null || reqOpts === void 0 ? void 0 : reqOpts.headers, | ||
}, | ||
method, | ||
}); | ||
}; | ||
const { protocol } = new URL(baseUrl); | ||
@@ -89,0 +96,0 @@ if (protocol !== "http:") { |
@@ -82,7 +82,14 @@ "use strict"; | ||
this.buildUrl = (pathOrUrl) => pathOrUrl instanceof URL ? pathOrUrl : new URL(pathOrUrl, this.baseUrl); | ||
this.combineOpts = (method, reqOpts) => ({ | ||
...this.baseReqOpts, | ||
...reqOpts, | ||
method, | ||
}); | ||
this.combineOpts = (method, reqOpts) => { | ||
var _a; | ||
return ({ | ||
...this.baseReqOpts, | ||
...reqOpts, | ||
headers: { | ||
...(_a = this.baseReqOpts) === null || _a === void 0 ? void 0 : _a.headers, | ||
...reqOpts === null || reqOpts === void 0 ? void 0 : reqOpts.headers, | ||
}, | ||
method, | ||
}); | ||
}; | ||
const { protocol } = new URL(baseUrl); | ||
@@ -89,0 +96,0 @@ if (protocol !== "https:") { |
@@ -97,3 +97,7 @@ "use strict"; | ||
telemetry.once(telemetry_1.EventType.RequestStreamInitialised, ({ data: { opts } }) => { | ||
assert_1.default.deepStrictEqual(opts, { agent: false, method: types_1.Method.Get }); | ||
assert_1.default.deepStrictEqual(opts, { | ||
agent: false, | ||
headers: {}, | ||
method: types_1.Method.Get, | ||
}); | ||
}); | ||
@@ -100,0 +104,0 @@ telemetry.once(telemetry_1.EventType.RequestStreamEnded, noop); |
@@ -187,2 +187,6 @@ import { EventEmitter } from "events"; | ||
...reqOpts, | ||
headers: { | ||
...this.baseReqOpts?.headers, | ||
...reqOpts?.headers, | ||
}, | ||
method, | ||
@@ -189,0 +193,0 @@ }); |
@@ -192,2 +192,6 @@ import { EventEmitter } from "events"; | ||
...reqOpts, | ||
headers: { | ||
...this.baseReqOpts?.headers, | ||
...reqOpts?.headers, | ||
}, | ||
method, | ||
@@ -194,0 +198,0 @@ }); |
{ | ||
"name": "@hqoss/http-client", | ||
"version": "0.1.25-0", | ||
"version": "0.1.26-0", | ||
"description": "A light-weight, performant, composable blueprint for writing consistent and re-usable Node.js HTTP clients", | ||
@@ -36,11 +36,11 @@ "main": "./dist/lib/index.js", | ||
"dependencies": { | ||
"tslib": "^2.0.0" | ||
"tslib": "^2.0.1" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^14.0.13", | ||
"nock": "^12.0.3", | ||
"@types/node": "^14.6.0", | ||
"nock": "^13.0.4", | ||
"prettier": "2.0.5", | ||
"typedoc": "^0.17.7", | ||
"typedoc-plugin-markdown": "^2.3.1", | ||
"typescript": "^3.9.5" | ||
"typedoc": "^0.18.0", | ||
"typedoc-plugin-markdown": "^2.4.1", | ||
"typescript": "^3.9.7" | ||
}, | ||
@@ -47,0 +47,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
214878
1319
Updatedtslib@^2.0.1