- Accepting incoming TCP packets
- Reading the request string line by line
- Parsing the request string into headers and body
- Passing the request to a handler function
- /echo/{foo}: prints the request back to the client
- if contains body and valid Accept-Encoding header, compresses the body
- /files/{foo}: serves files from the filesystem
- if POST, saves the body to a file
- /echo/{foo}: prints the request back to the client
- Handles Concurrent Connections
cd app && go run .
Use a http client such as curl to interact with the server.
cd app && go test -v .
- Add SSL support (HTTPS)
- Add CRUD capabilities (PUT, DELETE)
- Add query parameter support (?foo=bar)
- Add JSON support
- Add logging