go-httpbin
A reasonably complete and well-tested golang port of Kenneth Reitz's httpbin service, with zero dependencies outside the go stdlib.
Usage
Run as a standalone binary, configured by command line flags or environment variables:
$ go-httpbin -help
Usage of ./dist/go-httpbin:
-max-duration duration
Maximum duration a response may take (default 10s)
-max-memory int
Maximum size of request or response, in bytes (default 1048576)
-port int
Port to listen on (default 8080)
Docker images are also available on Docker Hub:
$ docker run -P mccutchen/go-httpbin
Installation
go get github.com/mccutchen/go-httpbin/...
See also
- kennethreitz/httpbin — the original Python version, without which this knock-off wouldn't exist
- ahmetb/go-httpbin — another golang port
Development
# local development
make
make test
make testcover
make run
# building & pushing docker images
make image
make imagepush