Skip to content

Commit

Permalink
fix: fetch
Browse files Browse the repository at this point in the history
Update fetch.mjs
  • Loading branch information
VirgilClyne committed Dec 24, 2024
1 parent 6ee966f commit 79c4c95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion polyfill/fetch.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export async function fetch(resource, options = {}) {
status: response.status,
statusCode: response.status,
statusText: response.statusText,
body: bodyBytes.toString("utf-8"),
body: new TextDecoder("utf-8").decode(bodyBytes),
bodyBytes: bodyBytes,
headers: Object.fromEntries(Object.entries(headers).map(([key, value]) => [key, key.toLowerCase() !== "set-cookie" ? value.toString() : value])),
};
Expand Down

0 comments on commit 79c4c95

Please sign in to comment.