Skip to content

Commit

Permalink
Use new timeout variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-ksh committed Aug 30, 2023
1 parent c020e95 commit bfd56ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/http-requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class HttpRequests {
this.headers = createHeaders(config)
this.requestConfig = config.requestConfig
this.httpClient = config.httpClient
this.timeout = config.timeout
this.requestTimeout = config.timeout

try {
const host = constructHostURL(config.host)
Expand Down Expand Up @@ -151,7 +151,7 @@ class HttpRequests {
body,
headers,
},
this.timeout
this.requestTimeout
)

// When using a custom HTTP client, the response is returned to allow the user to parse/handle it as they see fit
Expand All @@ -174,7 +174,7 @@ class HttpRequests {
async fetchWithTimeout(
url: string,
options: RequestInit | undefined,
timeout: HttpRequests['timeout']
timeout: HttpRequests['requestTimeout']
): Promise<Response> {
return new Promise((resolve, reject) => {
const fetchFn = this.httpClient ? this.httpClient : fetch
Expand Down

0 comments on commit bfd56ce

Please sign in to comment.