View Source HTTParrot
HTTP server built on top of Cowboy using (mostly) cowboy_rest handlers to serve useful endpoints for testing purposes. Its goal is to be as close as possible to HTTPBin.
Endpoints
/This page./ipReturns Origin IP./user-agentReturns user-agent./headersReturns header dict./getReturns GET data./postReturns POST data./putReturns PUT data./patchReturns PATCH data./deleteReturns DELETE data/gzipReturns gzip-encoded data./status/:codeReturns given HTTP Status code./response-headers?key=valReturns given response headers./redirect/:n301 Redirects n times./redirect-to?url=foo301 Redirects to the foo URL./relative-redirect/:n301 Relative redirects n times./cookiesReturns cookie data./cookies/set?name=valueSets one or more simple cookies./cookies/set/name/valueSets one cookie ./cookies/delete?nameDeletes one or more simple cookies./basic-auth/:user/:passwdChallenges HTTPBasic Auth./hidden-basic-auth/:user/:passwd404'd BasicAuth./digest-auth/:qop/:user/:passwdChallenges HTTP Digest Auth./stream/:nStreams nā100 lines./delay/:nDelays responding for nā10 seconds./htmlRenders an HTML Page./robots.txtReturns some robots.txt rules./denyDenied by robots.txt file./cacheReturns 200 unless an If-Modified-Since header is provided, when it returns a 304 Not Modified./base64/:valueDecodes base64url-encoded string./imageReturn an image based on Accept header./websocketEcho message received through websocket
TODO
- [ ]
/deflateReturns deflate-encoded data. - [ ]
/digest-auth/:qop/:user/:passwdChallenges HTTP Digest Auth.
Copyright and License
Copyright (c) 2013 Eduardo Gurgel eduardo@gurgel.me
This work is free. You can redistribute it and/or modify it under the terms of the MIT License. See the LICENSE.md file for more details.
