README

coffee.http418.nl is a coffee pot on the internet, built to RFC 2324, the Hyper Text Coffee Pot Control Protocol. It brews coffee, accepts additions, and expects you to say WHEN. The teapot next door, at tea.http418.nl, does not do coffee.

In the browser

Pick your additions on the front page and press BREW. If you chose milk, a WHEN button appears: press it when you've had enough, as section 2.1.4 of the RFC prescribes.

From the terminal

curl coffee.http418.nl

It speaks the real BREW method from RFC 2324 too, not just GET:

curl -X BREW coffee.http418.nl

Additions go in the Accept-Additions header, exactly as RFC 2324 defines it:

curl -H "Accept-Additions: Whole-milk, Vanilla" coffee.http418.nl

curl can't say WHEN, so the pot stops the milk at a sensible amount on your behalf. If you interrupt with Ctrl+C and your cursor goes missing, tput cnorm brings it back.

Additions

MilkCream, Half-and-half, Whole-milk, Part-Skim, Skim, Non-Dairy
SyrupVanilla, Almond, Raspberry, Chocolate
SpiritsWhisky, Rum, Kahlua, Aquavit
Sweeteners, spicesMentioned in RFC 2324, never defined. So: none.

Ask for anything else and the pot answers 406 Not Acceptable, with this menu.

Other pots, other drinks

RFC 2324 lets one machine have several pots, addressed as /pot-0, /pot-1 and so on. This machine has two: pot-0 brews coffee, and pot-1 is the espresso machine.

The protocol itself only knows coffee. Ask for an espresso, cappuccino, latte, flat white, macchiato, cortado, mocha, americano, ristretto or lungo, and you get 501 Not Implemented, plus the closest thing the pot can actually make:

curl -i coffee.http418.nl/cappuccino

Coffee in every language the RFC knows

Section 3 of the RFC lists the word for coffee in other languages and declares them all equivalent, so this pot answers to every one of them. Start with the Dutch:

curl coffee.http418.nl/koffie

The full list: koffie, akeita, koffee, kahva, kafe, café, kava, káva, kaffe, kafo, kohv, kahvi, Kaffee, qæhvæ, قهوة, 咖啡, καφέ, कौफी, コーヒー, 커피, кофе, กาแฟ, and plain coffee.

Things this README doesn't tell you

A coffee pot has its secrets too. Some hints:

Spoilers