Skip to content

Commit

Permalink
fix(connection): let fetch automatically infer the content-length header
Browse files Browse the repository at this point in the history
  • Loading branch information
DASPRiD committed Nov 1, 2024
1 parent a5a998d commit a7ce592
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/Connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,6 @@ class Connection {
headers.set("Content-Type", "application/json");
}

if (typeof resolvedParams.body === "string" || Buffer.isBuffer(resolvedParams.body)) {
headers.set("Content-Length", resolvedParams.body.length.toString());
}

return new Request(url, {
keepalive: true,
method: resolvedParams.method,
Expand Down

0 comments on commit a7ce592

Please sign in to comment.