418 I'm a teapot
Asking a teapot to brew coffee results in the 418 I'm a teapot status code, an April Fools' joke from the IETF.
Table of Contents
Usage
The 418 I'm a teapot error message was designed as one of the IETF April Fools' jokes. The RFC states any teapot asked to brew coffee responds with this message. Specifically, the resulting message body is described as short and stout.
Although this status code is not used in production, many HTTP libraries support the code. An effort to remove this status code so the number is available for official use was met with resistance and led to the Save 418 initiative. The message and status code remain.
Example
The client requests coffee to be brewed, but the teapot objects.
Request
BREW /pot-1 HTTP/1.1
Host: www.example.re
Content-Type: message/coffeepot
Content-Length: 5
start
Response
HTTP/1.1 418 I'm a teapot
Content-Type: text/html
Content-Length: 147
<html>
<head>
<title>Beverage not supported</title>
</head>
<body>
<p>This is a teapot. Coffee is not supported.</p>
</body>
</html>
Code references
.NET
StatusCodes.Status418ImATeapot
Rust
http::StatusCode::IM_A_TEAPOT
Go
http.StatusTeapot
Symfony
Response::HTTP_I_AM_A_TEAPOT
Python3.9+
http.HTTPStatus.IM_A_TEAPOT
Angular
@angular/common/http/HttpStatusCode.ImATeapot
See also
- RFC 2324: Hyper Text Coffee Pot Control Protocol
- RFC 7168: The Hyper Text Coffee Pot Control Protocol for Tea Efflux Appliances
- HTTP status codes
- HTTP headers
Last updated: August 11, 2026