Re:Fetch API has landed into Node.js
by andrewl-hn on Tuesday February 01, 2022 @09:59AM
(#30163297)
Does it have to be a buy-in, though? You could agree on server-specific extensions to fetch and codify them in the same spec (so it doesn't get lost otherwise). Browser vendors wouldn't need to implement it but they will still keep an eye on it when working on future browser apis.
Codifying the redirect behaviour for server/"trusted" envs makes some sense with Deno/node doing the same thing. I'm not versed enough in the standards orginazation politics to say if that's viable though.
The rest of your "improvements" aren't that. They're opinions, opinions laser focused on a JSON centric api.
I'm sorry to say this, but not all of the web is one big JSON blob.
Some of us have to talk to SOAP (xml) services.
Sometimes it's weird rpc stuff with protobuf.
Or even just pulling down raw binary data and feeding that through an API/library that wasn't built for web streams.
Honestly, the amount of code you need to add over the top of a primitive like the Fetch API to get what you wanted (bar the redirect change) is trivial and minimal.
Can you share your setup for talking to SOAP services?
Re:Fetch API has landed into Node.js
by true_religion on Tuesday February 01, 2022 @10:43AM
(#30164007)
It would be useful for trusted browser extensions too, as well as probably Electon apps as well.
I don’t know if chrome apps are still in existence, but if they are the “server side” fetch spec could apply to them too.
The level of collaboration and good-faith we've been getting from spec bodies like WHATWG is very high as it is and we really don't want to push or abuse it.