Skip to content

Commit 882c45f

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore(internal): remove unnecessary getRequestClient function (#623)
1 parent d3dd7d5 commit 882c45f

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

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

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

0 commit comments

Comments
 (0)