Hacker News new | ask | show | jobs
by zja 55 days ago
They just implement the fetch api from the web, does the fetch api allow get’s to have a body?
1 comments

Node allows it. Curl allows. Not having it is a breaking change and undesirable for node compatibility.
A body is technically allowed on any http request but it doesn’t mean anything on a get, a server is free to ignore it, anything in the middle is free to strip it, etc.
And yet many don't, Istio/Envoy for example. There are enough usable applications that utilize it that ignoring the body comes with a cost.
If you need bug-for-bug node compatibility you should be using node.
Your "bug-for-bug" compatibility ensures Axios, Elasticsearch, many GraphQL implementations, etc. works. Hence I will use node as mentioned in my original comment.

You should use bun :)