Code Monkey home page Code Monkey logo

httparrot's Introduction

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 nโ€“100 lines.
  • /delay/:n Delays responding for nโ€“10 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.
  • /digest-auth/:qop/:user/:passwd Challenges HTTP Digest Auth.

License

Copyright 2013-2016 Eduardo Gurgel <[email protected]>

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.

httparrot's People

Contributors

edgurgel avatar bratsche avatar jordan0day avatar lexmag avatar flupke avatar princemaple avatar rhruiz avatar hveiras avatar idabmat avatar reset avatar h4cc avatar nashby avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.