HTTP request & response service, useful to test various HTTP operations.
Built with httpbin, originally created by Kenneth Reitz.
Execute the microservice container with the following command :
docker run -ti -p 9901:80 msagency/msa-httpbin
$ curl http://localhost:9901/user-agent
{
"user-agent": "curl/7.47.0"
}
- GET /httpbin/ : returns the httpbin original readme, listing all the URLs below :
- GET /httpbin/ip returns the origin IP
- GET /httpbin/user-agent returns the user-agent
- GET /httpbin/headers returns the header dict
- GET /httpbin/get returns GET data
- POST /post returns POST data
- PATCH /patch returns PATCH data
- PUT /put returns PUT data
- DELETE /delete returns DELETE data
- GET /httpbin/encoding/utf8 returns a page containing UTF-8 data
- GET /httpbin/gzip returns gzip-encoded data
- GET /httpbin/deflate returns deflate-encoded data
- GET /httpbin/status/:code returns given HTTP Status code
- GET /httpbin/response-headers?key=val returns given response headers
- GET /httpbin/redirect/:n 302 redirects n times
- GET /httpbin/redirect-to?url=foo 302 redirects to the foo URL
- GET /httpbin/redirect-to?url=foo&status_code=307 307 redirects to the foo URL
- GET /httpbin/relative-redirect/:n 302 relative redirects n times
- GET /httpbin/absolute-redirect/:n 302 absolute redirects n times
- GET /httpbin/cookies returns cookie data
- GET /httpbin/cookies/set?name=value sets one or more simple cookies
- GET /httpbin/cookies/delete?name deletes one or more simple cookies
- GET /httpbin/basic-auth/:user/:passwd challenges HTTPBasic Auth
- GET /httpbin/hidden-basic-auth/:user/:passwd 404'd BasicAuth
- GET /httpbin/digest-auth/:qop/:user/:passwd/:algorithm challenges HTTP Digest Auth
- GET /httpbin/digest-auth/:qop/:user/:passwd challenges HTTP Digest Auth
- GET /httpbin/stream/:n streams min(n, 100) lines
- GET /httpbin/delay/:n delays responding for min(n, 10) seconds
- GET /httpbin/drip?numbytes=n&duration=s&delay=s&code=code Drips data over a duration after an optional initial delay, then (optionally) returns with the given status code.
- GET /httpbin/range/1024?duration=s&chunk_size=code streams n bytes, and allows specifying a Range header to select a subset of the data. Accepts a chunk_size and request duration parameter.
- GET /httpbin/html Renders an HTML Page
- GET /httpbin/robots.txt returns some robots.txt rules
- GET /httpbin/deny denied by robots.txt file
- GET /httpbin/cache returns 200 unless an If-Modified-Since or If-None-Match header is provided, when it returns a 304.
- GET /httpbin/cache/:n sets a Cache-Control header for n seconds
- GET /httpbin/bytes/:n generates n random bytes of binary data, accepts optional seed integer parameter
- GET /httpbin/stream-bytes/:n streams n random bytes of binary data, accepts optional seed and chunk_size integer parameters.
- GET /httpbin/links/:n returns a page containing n HTML links
- GET /httpbin/image returns a page containing an image based on sent Accept header
- GET /httpbin/image/png returns a page containing a PNG image
- GET /httpbin/image/jpeg returns a page containing a JPEG image
- GET /httpbin/image/webp returns a page containing a WEBP image
- GET /httpbin/image/svg returns a page containing a SVG image
- GET /httpbin/forms/post HTML form that submits to /post
- GET /httpbin/xml returns some XML
- GET /ms/version : returns the version number
- GET /ms/name : returns the name
- GET /ms/readme.md : returns the readme (this file)
- GET /ms/readme.html : returns the readme as html
- GET /swagger/swagger.json : returns the swagger api documentation
- GET /swagger/#/ : returns swagger-ui displaying the api documentation
- GET /nginx/stats.json : returns stats about Nginx
- GET /nginx/stats.html : returns a dashboard displaying the stats from Nginx
A project by the Microservices Agency.