Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Http does allow you to get the raw data and treat it as you will. It also isn't that much code. Check out the custom requests section of the documentation.


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.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: