Skip to content

Commit ad17e82

Browse files
chore(internal): remove unnecessary getRequestClient function (#62)
1 parent 535d652 commit ad17e82

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/core.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -523,19 +523,13 @@ export abstract class APIClient {
523523
const timeout = setTimeout(() => controller.abort(), ms);
524524

525525
return (
526-
this.getRequestClient()
527-
// use undefined this binding; fetch errors if bound to something else in browser/cloudflare
528-
.fetch.call(undefined, url, { signal: controller.signal as any, ...options })
529-
.finally(() => {
530-
clearTimeout(timeout);
531-
})
526+
// use undefined this binding; fetch errors if bound to something else in browser/cloudflare
527+
this.fetch.call(undefined, url, { signal: controller.signal as any, ...options }).finally(() => {
528+
clearTimeout(timeout);
529+
})
532530
);
533531
}
534532

535-
protected getRequestClient(): RequestClient {
536-
return { fetch: this.fetch };
537-
}
538-
539533
private shouldRetry(response: Response): boolean {
540534
// Note this is not a standard header.
541535
const shouldRetryHeader = response.headers.get('x-should-retry');

0 commit comments

Comments
 (0)