Skip to content

Commit

Permalink
add configurable timeout for Http Client
Browse files Browse the repository at this point in the history
  • Loading branch information
vildanbina committed Dec 18, 2024
1 parent 68c2f9b commit bc613a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Request/HttpsClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export default class HttpsClient {
protected _options: AxiosRequestConfig = {};
private _axiosInstance: AxiosInstance;

constructor(agent?: Agent, timeout: number = 10000) {
this._options.timeout = timeout;
constructor(agent?: Agent, timeout?: number) {
this._options.timeout = timeout ?? 10000;
this._options.maxRedirects = 10;
this._options.withCredentials = true;

Expand Down

0 comments on commit bc613a9

Please sign in to comment.