Skip to content

Commit 4ef545c

Browse files
committed
refactor(binding-http): rename HttpClientImpl.fetch to doFetch
1 parent 9c2c425 commit 4ef545c

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

packages/binding-http/src/http-client-impl.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export default class HttpClient implements ProtocolClient {
126126
const request = await this.generateFetchRequest(form, "GET", { headers });
127127
debug(`HttpClient (readResource) sending ${request.method} to ${request.url}`);
128128

129-
const result = await this.fetch(request);
129+
const result = await this.doFetch(request);
130130

131131
this.checkFetchResponse(result);
132132

@@ -150,7 +150,7 @@ export default class HttpClient implements ProtocolClient {
150150
request.url
151151
}`
152152
);
153-
const result = await this.fetch(request);
153+
const result = await this.doFetch(request);
154154

155155
debug(`HttpClient received ${result.status} from ${result.url}`);
156156

@@ -213,7 +213,7 @@ export default class HttpClient implements ProtocolClient {
213213
} to ${request.url}`
214214
);
215215

216-
const result = await this.fetch(request);
216+
const result = await this.doFetch(request);
217217

218218
debug(`HttpClient received ${result.status} from ${request.url}`);
219219
debug(`HttpClient received Content-Type: ${result.headers.get("content-type")}`);
@@ -245,7 +245,7 @@ export default class HttpClient implements ProtocolClient {
245245
Accept: "application/td+json",
246246
};
247247
const request = await this.generateFetchRequest({ href: uri }, "GET", headers);
248-
const response = await this.fetch(request);
248+
const response = await this.doFetch(request);
249249
const body = ProtocolHelpers.toNodeStream(response.body as Readable);
250250
return new Content(response.headers.get("content-type") ?? "application/td+json", body);
251251
}
@@ -427,7 +427,7 @@ export default class HttpClient implements ProtocolClient {
427427
return fetch(request, { body: request.body });
428428
}
429429

430-
private async fetch(request: Request) {
430+
private async doFetch(request: Request) {
431431
const result = await this._fetch(request);
432432

433433
if (HttpClient.isOAuthTokenExpired(result, this.credential)) {

packages/binding-http/src/subscription-protocols.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class LongPollingSubscription implements InternalSubscription {
5050
timeout: 1000,
5151
signal: this.abortController.signal as AbortSignal,
5252
});
53-
const result = await this.client["fetch"](headRequest);
53+
const result = await this.client["doFetch"](headRequest);
5454
if (result.ok) resolve();
5555
}
5656

@@ -61,7 +61,7 @@ export class LongPollingSubscription implements InternalSubscription {
6161
});
6262
debug(`HttpClient (subscribeResource) sending ${request.method} to ${request.url}`);
6363

64-
const result = await this.client["fetch"](request);
64+
const result = await this.client["doFetch"](request);
6565

6666
this.client["checkFetchResponse"](result);
6767

0 commit comments

Comments
 (0)