HTCPCP request syntax

The BREW method

HTCPCP adds one method to HTTP for making coffee, BREW, and one header for saying how you take it, Accept-Additions. RFC 7168 later extended both to tea. This page puts the whole request syntax in one place, with commands you can run against two live pots.

A complete request

This is a request for a coffee with whole milk and vanilla syrup, as RFC 2324 describes it:

BREW /pot-0 HTCPCP/1.0
Host: coffee.http418.nl
Content-Type: message/coffeepot
Accept-Additions: Whole-milk, Vanilla

start

The same request with curl. curl speaks HTTP, not HTCPCP/1.0, but sends any method you give it:

curl -X BREW -H "Content-Type: message/coffeepot" \
     -H "Accept-Additions: Whole-milk, Vanilla" \
     -d start https://coffee.http418.nl/pot-0

The methods

BREW (and POST)

Starts or stops the pot. The body is either start or stop, and the content type is message/coffeepot. POST does the same thing, for clients that don't know BREW. Section 2.1.1 also names a second media type, application/coffee-pot-command. That is a known mistake; see the errata.

curl -X BREW coffee.http418.nl

GET

Fetches coffee. The RFC notes that the data returned contains no caffeine.

PROPFIND

Borrowed from WebDAV: asks the pot for its metadata. The coffee pot at http418.nl answers with 207 Multi-Status and a live cup count.

curl -X PROPFIND https://coffee.http418.nl/pot-0

WHEN

Milk is poured until someone says when. The client sends WHEN to stop the pouring. Leave it out and you get a lot of milk.

Accept-Additions

A comma-separated list of what you want in the cup. RFC 2324 defines these values:

KindValues
MilkCream, Half-and-half, Whole-milk, Part-Skim, Skim, Non-Dairy
SyrupVanilla, Almond, Raspberry, Chocolate
AlcoholWhisky, Rum, Kahlua, Aquavit
Sweetener, spiceIn the grammar, but never defined

A pot that can't make what you asked for answers 406 Not Acceptable, and should say which additions it does have. Decaf isn't an option at all: section 2.2.3 says so, in so many words.

curl -i -H "Accept-Additions: Decaf" coffee.http418.nl

The coffee: URI scheme

RFC 2324 gives coffee its own URI scheme, with the word for coffee in many languages (koffie:, kaffe:, kahvi: and so on), and a pot designator for machines with more than one pot: coffee://host/pot-0. No browser opens these, so the coffee pot at http418.nl accepts each word as a path instead:

curl coffee.http418.nl/koffie

Tea: RFC 7168

HTCPCP-TEA keeps BREW and adds what a teapot needs:

curl -i -X BREW -H "Content-Type: message/teapot" -d start https://tea.http418.nl/tea/darjeeling

The responses

CodeWhenDefined in
300BREW to a teapot's root: here are the teas7168 §2.1.1
403A combination of additions nobody should drink7168 §2.3.2
406Additions the pot doesn't have2324 §2.3.1
418Asked for coffee, but I'm a teapot, permanently2324 §2.3.2
503Can't make coffee right now, for instance out of beans7168 §2.3.3
curl -I https://http418.nl/coffee
HTTP/2 418

From a browser

HTML forms can only send GET and POST, but fetch() accepts any method name, BREW included:

fetch("https://coffee.http418.nl/", { method: "BREW", body: "start",
  headers: { "Content-Type": "message/coffeepot" } })

Across origins, the browser first sends a CORS preflight (OPTIONS) and only brews if the server allows the method. The playground builds these requests for you.

Last updated 2026-10-25.