Live data from Hacker News

HTTP Status 418 – I'm a teapot

developer.mozilla.org

41–50 of 114 posts

Re: HTTP Status 418 – I'm a teapot

#41
post #16
post #10

It's quaint, it's a joke about IoT devices before they were everywhere. I'm currently disappointed that the office has "upgraded" coffee machines and the new one has a permanent internet connection and shows ads/branding (for coffee) when it is idle.

A couple of years ago the gas pumps at station nearest to my place were replaced by devices with screens that play ads with sound - so far just touting discounts with their supermarket loyalty cards. They start when someone picks up the nozzle, and were annoyingly loud initially; the sound has been turned down a bit lately. (Well, there's another reason for me to be pleased with having traded one of the family cars f…

There are a few gas stations around here with pumps that like to play ads at you while pumping gas. I tend to make a note of them and purposely get my gas elsewhere.

Re: HTTP Status 418 – I'm a teapot

#43
post #40

Earlier quoted context omitted.

I still love that people actually went through the effort to "implement" it.

Any links to APIs that implement a 418 HTTP response code?

.Net seems to have it: https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnet...

Re: HTTP Status 418 – I'm a teapot

#44
post #35
post #10

It's quaint, it's a joke about IoT devices before they were everywhere. I'm currently disappointed that the office has "upgraded" coffee machines and the new one has a permanent internet connection and shows ads/branding (for coffee) when it is idle.

Do you mean ads in the sense of "please buy brand X coffee" or in the sense of "please try some of this machine's delicious coffee"?

just stuff that emphasizes the brand of coffee that's in the machine. It's ridiculous (obviously an ad to buy that brand at home too, which I safely won't since I like my specialty coffee).

We need coffee machines that shut up and serve coffee and don't do brand ads.

Re: HTTP Status 418 – I'm a teapot

#45
post #40

Earlier quoted context omitted.

I still love that people actually went through the effort to "implement" it.

Any links to APIs that implement a 418 HTTP response code?

If I have anything to do with it, there is a 418 response hidden somewhere.

I recall a few internal projects at a previous employer would return 418 if the user managed to royally mess something up as a "wtf, how are you here?!" kind of response.

I feel like I am not alone in implementing 'weird' HTTP codes when I get bored / as an easter egg. Pretty sure I also used HTTP 420 at least once.

Re: HTTP Status 418 – I'm a teapot

#46

For those who may not know, this comes from RFC 2324: ""Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) , The RFC was published 1 April 1998 (April Fool's Day). There's a long history of humorous RFCs published on 1 April. For example, RFC 1149 "IP over Avian Carriers" https://en.wikipedia.org/wiki/IP_over_Avian_Carriers List of Additional April Fool's RFCs https://en.wikipedia.org/wiki/April_Fools%27_Day_Request…

To toot my own horn, I did an April Fool’s status code RFC: 397 Tolerating, for when a client sends a flawed request, but you’re going to tolerate it because you know what they really meant:

https://pastebin.com/TPj9RwuZ

Re: HTTP Status 418 – I'm a teapot

#47
post #21
post #10

It's quaint, it's a joke about IoT devices before they were everywhere. I'm currently disappointed that the office has "upgraded" coffee machines and the new one has a permanent internet connection and shows ads/branding (for coffee) when it is idle.

So, if the server were a real "smart" IoT teapot, such response become actually valid? :)

Well, this is an error code, so yes but- only if someone asks the teapot to brew a cup of coffee. Per the spec.

Re: HTTP Status 418 – I'm a teapot

#48
post #43
post #40

Earlier quoted context omitted.

Any links to APIs that implement a 418 HTTP response code?

.Net seems to have it: https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnet...

http.StatusTeapot in Go: https://pkg.go.dev/net/http#pkg-constants

4k+ results on Github: https://github.com/search?utf8=&q=http.StatusTeapot&type=Cod...; ~600 excluding _test.go files: https://github.com/search?q=http.StatusTeapot+-filename%3A*_...

Re: HTTP Status 418 – I'm a teapot

#49
I guess it's been about a generation since I implemented this as an easter-egg in a RESTful API service I built. It was quite the joke then, but now with IoT "smart" teapots and whatnot being so popular, it's not so funny now.

Re: HTTP Status 418 – I'm a teapot

#50
post #46

For those who may not know, this comes from RFC 2324: ""Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) , The RFC was published 1 April 1998 (April Fool's Day). There's a long history of humorous RFCs published on 1 April. For example, RFC 1149 "IP over Avian Carriers" https://en.wikipedia.org/wiki/IP_over_Avian_Carriers List of Additional April Fool's RFCs https://en.wikipedia.org/wiki/April_Fools%27_Day_Request…

To toot my own horn, I did an April Fool’s status code RFC: 397 Tolerating, for when a client sends a flawed request, but you’re going to tolerate it because you know what they really meant: https://pastebin.com/TPj9RwuZ

This is a good idea for APIs that allow you to update an object by sending a partial JSON object with the keys you want to update, when technically you’re supposed to send the entire updated object representation unless JSON Patch is being used.
Post reply on HN