Get the latest tech news
Writing an HTTP Server in Go from Scratch: Part 1
Follow along while I write an HTTPServer in Go From scratch following a codecrafters challenge.
The platform runs a battery of tests after each commit, making sure that all previous steps are still working as expected which is quite helpful. For the final step of the main challenge, I must read the request body, I started by adding some fields to the HTTPRequest struct I’m now reading the Accept-Encoding header, looking through each of the encodings accepted by the client, and when I find one the server support (gzip in our case), I use it to compress our response.
Or read this on Hacker News