Skip to content

Commit

Permalink
fix: support http serverUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
bgiori committed Feb 29, 2024
1 parent aba5334 commit a0bd3b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/node/src/transport/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@ export class FetchHttpClient implements HttpClient {
method: method,
headers: headers,
body: body,
agent: this.httpAgent,
timeout: timeoutMillis,
};

if (urlParams.protocol === 'https:') {
options['agent'] = this.httpAgent;
}

const protocol = urlParams.protocol === 'http:' ? http : https;
const req = protocol.request(options);

Expand Down

0 comments on commit a0bd3b6

Please sign in to comment.