Skip to content

Commit fcf3e35

Browse files
chore(client): minor internal fixes
1 parent 6ed0bd6 commit fcf3e35

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/core.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,10 @@ export abstract class APIClient {
330330
}
331331

332332
buildRequest<Req>(
333-
options: FinalRequestOptions<Req>,
333+
inputOptions: FinalRequestOptions<Req>,
334334
{ retryCount = 0 }: { retryCount?: number } = {},
335335
): { req: RequestInit; url: string; timeout: number } {
336-
options = { ...options };
336+
const options = { ...inputOptions };
337337
const { method, path, query, headers: headers = {} } = options;
338338

339339
const body =
@@ -361,8 +361,8 @@ export abstract class APIClient {
361361
}
362362

363363
if (this.idempotencyHeader && method !== 'get') {
364-
if (!options.idempotencyKey) options.idempotencyKey = this.defaultIdempotencyKey();
365-
headers[this.idempotencyHeader] = options.idempotencyKey;
364+
if (!inputOptions.idempotencyKey) inputOptions.idempotencyKey = this.defaultIdempotencyKey();
365+
headers[this.idempotencyHeader] = inputOptions.idempotencyKey;
366366
}
367367

368368
const reqHeaders = this.buildHeaders({ options, headers, contentLength, retryCount });

0 commit comments

Comments
 (0)