2 ms·
Right, I know how to get around this issue when I need to. My point was that the library makes a default assumption which is often enough false. And then I have
by zalmoxes 10y ago
Right, I know how to get around this issue when I need to. My point was that the library makes a default assumption which is often enough false. And then I have to change things.
Compare this to Go, or even Fetch. You send a request, and you get back a response, with a Body, Headers and Status. A language error type is only expected in case of the request not succeeding, like a timeout.
Here, the library makes 2 assumptions. That a non-200 status is an Error, and that the response is a String.
These assumptions would be ok in a higher level library someone wanted to build, but as part of a core, they're too high level to work for everyone with the defaults.