Skip to content

toolmantim/teapot

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 

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.

Hater of English Breakfast? You’re in luck—just pass in your preferred brew.

use Teapot, "Lady Grey"

BREWING

You can perform a BREW request using curl’s request method flag -X:

curl -i -X BREW myrackapp.com

About

Rack middleware to help you, as a teapot, comply with HTCPCP/1.0: the Hyper Text Coffee Pot Control Protocol

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages