The server refuses to brew coffee because it is, permanently, a teapot.
Any attempt to brew coffee with a teapot should result in the error code 418. This status code was defined in RFC 2324, the Hyper Text Coffee Pot Control Protocol (HTCPCP), published as an April Fools' joke on April 1, 1998. Despite being a joke, it has become one of the most beloved Easter eggs in web development.
RFC 2324 was published on April 1, 1998 by Larry Masinter. It defines HTCPCP - a protocol for controlling, monitoring, and diagnosing coffee pots. The spec introduced the BREW HTTP method and the 418 status code, which a teapot returns when asked to brew coffee. The RFC was updated in 2014 by RFC 7168, which extended HTCPCP to handle tea.
In 2017, chairman of the HTTP Working Group Mark Nottingham proposed removing 418 from Node.js, Go, and other implementations. The developer community rallied behind the "Save 418" movement, and the code was preserved. Google even has a fun Easter egg at google.com/teapot.
Framework Support:
Node.js Natively supported. res.status(418).send("I'm a teapot") works out of the box in Express.
Python Django and Flask both support HttpResponse(status=418). Python's http.client includes it in status codes.
Go Defined as http.StatusTeapot in Go's standard library net/http package.
ASP.NET Available as StatusCodes.Status418ImATeapot since .NET Core.
# Attempting to brew coffee with a teapot (per HTCPCP) BREW /coffee HTTP/1.1 Host: teapot.example.com Content-Type: application/coffee-pot-command Accept-Additions: cream # Teapot Response HTTP/1.1 418 I'm a Teapot Content-Type: text/html <html> <body> <h1>418 - I'm a Teapot</h1> <p>I can't brew coffee. I'm a teapot.</p> <p>This error is defined by RFC 2324.</p> </body> </html>
/teapot), but for actual error handling, always use the appropriate standard status code. If you're rejecting a request, use 400, 403, or 404 as appropriate.BREW method for starting coffee and the WHEN method for stopping the pour. The 418 status code is returned when you try to brew coffee with a teapot. It was updated in 2014 by RFC 7168, which extended HTCPCP to support tea preparation.Track uptime, response codes, and performance across all your endpoints - teapots included.
Start Free Monitoring