Skip to content

Commit

Permalink
fix headers type
Browse files Browse the repository at this point in the history
  • Loading branch information
styu committed Nov 21, 2024
1 parent b260312 commit 482bc68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export namespace WidgetMessage {
id: string;
url: string;
method: string;
headers: Record<string, string>;
headers: Record<string, string> | [string, string][];
body?: string;
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/widget.client.unstable/src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export function serializeRequest(
id,
url: input,
method: init?.method ?? "GET",
headers: Object.fromEntries([
headers: [
...new Headers(init?.headers ?? {}).entries(),
]),
],
body: body as any,
};
}
Expand Down

0 comments on commit 482bc68

Please sign in to comment.