Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 1018 Bytes

README.md

File metadata and controls

26 lines (16 loc) · 1018 Bytes

progress-banner

HTTP is the protocol that powers the web. This repo builds a HTTP/1.1 server that is capable of serving multiple clients.

Note: If you're viewing this repo on GitHub, head over to codecrafters.io to try the challenge.

Running the app

go run app/server.go --directory /tmp

Sample curls to try

curl -v http://localhost:4221/

curl -v http://localhost:4221/user-agent -H "User-Agent: grape/grape-mango"

curl -v http://localhost:4221/echo/blueberry

curl -v -X POST http://localhost:4221/files/orange_orange_strawberry_raspberry -H "Content-Length: 56" -H "Content-Type: application/octet-stream" -d 'apple apple pear strawberry apple mango blueberry orange'

curl -v -H "Accept-Encoding: gzip" http://localhost:4221/echo/abc | gzip -d