README
tea.http418.nl is a teapot on the internet. It follows RFC 2324, the Hyper Text Coffee Pot Control Protocol, and RFC 7168, its extension for tea, more faithfully than anyone asked it to.
Endpoints
| Request | What you get |
|---|---|
/ | The teapot. 200 OK, surprisingly. |
/coffee | 418 I'm a teapot. Stable, so use it to test your HTTP client or error handling. |
/tea | A cup of Earl Grey, brewed in your browser, plus a steeping guide. |
/tea/<name> | Any tea you like, at the right water temperature. Try /tea/oolong. |
/api/cups | How many cups have been brewed here, as JSON. |
/specs | The teapot's spec sheet, with live readings. |
On /tea, tick Steep in real time to turn the page into an actual tea timer, with a chime when it's done.
From the terminal
Terminals get their own show:
curl tea.http418.nl/tea/darjeeling
Give it a window at least 40 columns wide. If you interrupt it with Ctrl+C and your cursor goes missing, tput cnorm brings it back.
Additions
The teapot honours the Accept-Additions header from RFC 2324, section 2.3.1. Ask for something it doesn't stock and it answers 406 Not Acceptable, with a list of what it does have:
curl -i -H "Accept-Additions: Whole-milk" https://tea.http418.nl/tea
Things this README doesn't tell you
A teapot keeps a few secrets. Some hints:
- One tea is perfectly happy to take milk.
- There is something stronger in the cupboard.
- Asking the tea page for coffee is still asking for coffee.
- Even getting lost has been catered for.
- Some things are only visible to people who read the source.
Spoilers
- Chai with milk is fine:
curl -i -H "Accept-Additions: Whole-milk" https://tea.http418.nl/tea/chai - So is whisky, on any tea:
curl -H "Accept-Additions: Whisky" https://tea.http418.nl/tea /tea/coffeeis a 418 too, in the browser and the terminal.- Visit any page that doesn't exist, like
/biscuits. - View the source of this page. Yes, this one.