Skip to content

Commit

Permalink
fix: Manually specify https options #94 #96
Browse files Browse the repository at this point in the history
  • Loading branch information
alkihis committed Oct 13, 2021
1 parent f3c224b commit 0d8f64d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/client-mixins/request-handler.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,14 @@ export class RequestHandlerHelper<T> {
if (TwitterApiV2Settings.debug) {
this.debugRequest();
}
this.req = request(this.requestData.url, this.requestData.options);
this.req = request({
...this.requestData.options,
// Define URL params manually, addresses dependencies error https://github.com/PLhery/node-twitter-api-v2/issues/94
host: this.requestData.url.host,
port: this.requestData.url.port || undefined,
path: this.requestData.url.pathname + this.requestData.url.search,
protocol: this.requestData.url.protocol,
});
}

makeRequest() {
Expand Down

0 comments on commit 0d8f64d

Please sign in to comment.