toolmantim / teapot
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
commit c05f5d146e89d4b8ce75125c057ed6cbedfa2dcf
tree 47108065d09eb84894879700ddba7088ddf30743
parent 3932b36052d6b017b27d2ffbf11d1c962c9161ab
tree 47108065d09eb84894879700ddba7088ddf30743
parent 3932b36052d6b017b27d2ffbf11d1c962c9161ab
teapot /
| name | age | message | |
|---|---|---|---|
| |
.gitignore | ||
| |
Changelog.rdoc | ||
| |
License | ||
| |
Rakefile | ||
| |
Readme.rdoc | ||
| |
lib/ | ||
| |
teapot.gemspec | ||
| |
test/ |
Readme.rdoc
teapot
It’s imperative to respond correctly to coffee machine BREW requests when you are, in fact, a teapot. This piece of Rack middleware will ensure you comply with HTCPCP/1.0: the Hyper Text Coffee Pot Control Protocol.
For more information see www.ietf.org/rfc/rfc2324.txt
INSTALL
sudo gem install toolmantim-teapot --source http://gems.github.com
USAGE
Simply require and use from your rackup file (e.g. config.ru):
require 'rubygems' require 'teapot' use Teapot
Your Rack application will now serve English Breakfast and respond with a 418 I’m a teapot if it receives any BREW or application/coffee-pot-command requests.
Tea connoisseurs may wish to refer to Teapot for a finer selection of tea.
BREWING
You can perform a BREW request using curl’s request method flag -X:
curl -i -X BREW myrackapp.com

