Skip to content

Commit bef3925

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore(internal): remove unnecessary getRequestClient function (#1215)
1 parent fbd9685 commit bef3925

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/core.ts

+4-10
Original file line numberDiff line numberDiff line change
@@ -558,19 +558,13 @@ export abstract class APIClient {
558558
const timeout = setTimeout(() => controller.abort(), ms);
559559

560560
return (
561-
this.getRequestClient()
562-
// use undefined this binding; fetch errors if bound to something else in browser/cloudflare
563-
.fetch.call(undefined, url, { signal: controller.signal as any, ...options })
564-
.finally(() => {
565-
clearTimeout(timeout);
566-
})
561+
// use undefined this binding; fetch errors if bound to something else in browser/cloudflare
562+
this.fetch.call(undefined, url, { signal: controller.signal as any, ...options }).finally(() => {
563+
clearTimeout(timeout);
564+
})
567565
);
568566
}
569567

570-
protected getRequestClient(): RequestClient {
571-
return { fetch: this.fetch };
572-
}
573-
574568
private shouldRetry(response: Response): boolean {
575569
// Note this is not a standard header.
576570
const shouldRetryHeader = response.headers.get('x-should-retry');

0 commit comments

Comments
 (0)