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.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Scratch

Scratch

Photo of http server

http server

Related news:

News photo

Programming terrain from scratch using C++ and OpenGL by Shamus Young (2006)

News photo

Implementing React from Scratch

News photo

Writing a C Compiler: Build a Real Programming Language from Scratch