A simple HTTP server written in Go.
Use the server-go.sh
script to build and run the server on port 4221.
Use the curl
command to send requests.
GET /echo/{string}
echos back a string in a response bodyGET /user-agent
reports back theuser-agent
headerGET /files/{filename}
passes the contents of a file in the response body. The directory of files is given to the server using the--directory
flagPOST /files/{filename}
accepts text from the client and creates a new file with that text
gzip