Loading...

Build your own HTTP server

Learn about TCP servers, the HTTP protocol and more

Start Building
http-server
Go
http-server
Python
http-server
Rust
http-server
TypeScript
http-server
JavaScript
http-server
Ruby
http-server
Haskell
http-server
Java
http-server
C
http-server
C++
http-server
C#
http-server
Zig
This challenge is free until 1 August 2024!

HTTP is the protocol that powers the web. In this challenge, you'll build a HTTP server that's capable of handling simple GET/POST requests, serving files and handling multiple concurrent connections.

Along the way, we'll learn about TCP connections, HTTP headers, HTTP verbs, handling multiple connections and more.

Stages

Bind to a port
Login via GitHub to view this stage
Respond with 200
Login via GitHub to view this stage
Extract URL path
Login via GitHub to view this stage
Respond with body
Login via GitHub to view this stage
Read header
Login via GitHub to view this stage
Concurrent connections
Login via GitHub to view this stage
Return a file
Login via GitHub to view this stage
Read request body
Login via GitHub to view this stage

HTTP Compression

Compression headers
Login via GitHub to view this stage
Multiple compression schemes
Login via GitHub to view this stage
Gzip compression
Login via GitHub to view this stage