Skip to content

Commit c7330e6

Browse files
committed
CCR
1 parent 8aede2b commit c7330e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/httpRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export async function httpRequest<T>(
1919
signRequest?: (request: RequestOptionsLike) => Promise<void>,
2020
errorHandling: ErrorHandling = ErrorHandling.ThrowOnError
2121
): Promise<HttpResponse<T>> {
22-
const requestOptions: RequestInit = { ...options };
22+
const requestOptions: RequestInit = { ...options, headers: { ...options?.headers } };
2323
if (options?.form) {
2424
// URLSearchParams is a silly way to say "it's form data"
2525
requestOptions.body = new URLSearchParams(options.form);
@@ -109,7 +109,7 @@ export const enum HttpStatusCode {
109109
}
110110

111111
export interface RequestOptionsLike {
112-
headers?: { [key: string]: readonly string[] | string };
112+
headers?: { [key: string]: string };
113113
method?: RequestMethod; // This is an enum type because it enforces the above valid options on callers (which do not directly use node-fetch's Request object)
114114
form?: { [key: string]: string };
115115
body?: string;

0 commit comments

Comments
 (0)