1
0
Fork 0
mirror of https://github.com/edgurgel/httparrot synced 2025-04-05 08:12:31 -04:00
No description
Find a file
Eduardo Gurgel ba41736175 Bump version 0.3.4
[ci skip]
2015-01-14 00:11:36 +13:00
lib add support for chunked request bodies, fix a few test names 2015-01-11 22:31:46 -06:00
priv Add /gzip endpoint 2014-11-27 22:05:32 +13:00
test add support for chunked request bodies, fix a few test names 2015-01-11 22:31:46 -06:00
.gitignore Initial commit 2013-12-27 18:47:21 -03:00
.travis.yml Run tests on Travis CI on Elixir >= 1.0.0 2015-01-12 23:10:18 +13:00
LICENSE Add MIT License 2014-08-03 16:13:01 +12:00
mix.exs Bump version 0.3.4 2015-01-14 00:11:36 +13:00
mix.lock Use meck hex package 2014-08-20 23:36:20 +12:00
README.md Add /gzip endpoint 2014-11-27 22:05:32 +13:00

HTTParrot Build Status

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.
  • /ip Returns Origin IP.
  • /user-agent Returns user-agent.
  • /headers Returns header dict.
  • /get Returns GET data.
  • /post Returns POST data.
  • /put Returns PUT data.
  • /patch Returns PATCH data.
  • /delete Returns DELETE data
  • /gzip Returns gzip-encoded data.
  • /status/:code Returns given HTTP Status code.
  • /response-headers?key=val Returns given response headers.
  • /redirect/:n 301 Redirects n times.
  • /redirect-to?url=foo 301 Redirects to the foo URL.
  • /relative-redirect/:n 301 Relative redirects n times.
  • /cookies Returns cookie data.
  • /cookies/set?name=value Sets one or more simple cookies.
  • /cookies/set/name/value Sets one cookie .
  • /cookies/delete?name Deletes one or more simple cookies.
  • /basic-auth/:user/:passwd Challenges HTTPBasic Auth.
  • /hidden-basic-auth/:user/:passwd 404'd BasicAuth.
  • /digest-auth/:qop/:user/:passwd Challenges HTTP Digest Auth.
  • /stream/:n Streams n100 lines.
  • /delay/:n Delays responding for n10 seconds.
  • /html Renders an HTML Page.
  • /robots.txt Returns some robots.txt rules.
  • /deny Denied by robots.txt file.
  • /cache Returns 200 unless an If-Modified-Since header is provided, when it returns a 304 Not Modified.
  • /base64/:value Decodes base64url-encoded string.
  • /image Return an image based on Accept header.
  • /websocket Echo message received through websocket

TODO

  • /deflate Returns deflate-encoded data.
  • /response-headers?key=val Returns given response headers.
  • /digest-auth/:qop/:user/:passwd Challenges HTTP Digest Auth.

License

Copyright 2013-2014 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 file for more details.