News for hackers. Stuff that matters.
Re:Shinatra – A simple bash web server by minhajuddin on Wednesday November 23, 2016 @04:36AM (#13021319)
Many people here fail to realize, this is an excellent debugging server. I used to have a server to print out the body and headers of requests when building an api to make sure things were going (the right headers and request body) out as expected https://github.com/minhajuddin/httpdebug/blob/master/app.go.

This is a much lighter and nicer version. This is going into my ~/bin/httpdebug :)

You can try sending a few curl requests to see that this really prints the headers and body.

    curl -H "api-key: Foo" -X POST --form name=Khaja http://localhost:8080/
Re:Shinatra – A simple bash web server by devoply on Wednesday November 23, 2016 @02:04PM (#13024908)
ngrep port 80 works
Re:Shinatra – A simple bash web server by bbatha on Wednesday November 23, 2016 @11:10AM (#13023560)
Maybe I'm misunderstanding by why not just have your server have a a request logging middleware that respects some log level environment variable?