Skip to content

Commit 1f1fe88

Browse files
chore(internal): remove unnecessary getRequestClient function (#1215)
1 parent b8541fd commit 1f1fe88

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
@@ -537,19 +537,13 @@ export abstract class APIClient {
537537
const timeout = setTimeout(() => controller.abort(), ms);
538538

539539
return (
540-
this.getRequestClient()
541-
// use undefined this binding; fetch errors if bound to something else in browser/cloudflare
542-
.fetch.call(undefined, url, { signal: controller.signal as any, ...options })
543-
.finally(() => {
544-
clearTimeout(timeout);
545-
})
540+
// use undefined this binding; fetch errors if bound to something else in browser/cloudflare
541+
this.fetch.call(undefined, url, { signal: controller.signal as any, ...options }).finally(() => {
542+
clearTimeout(timeout);
543+
})
546544
);
547545
}
548546

549-
protected getRequestClient(): RequestClient {
550-
return { fetch: this.fetch };
551-
}
552-
553547
private shouldRetry(response: Response): boolean {
554548
// Note this is not a standard header.
555549
const shouldRetryHeader = response.headers.get('x-should-retry');

0 commit comments

Comments
 (0)