If you browse the web, I’m willing to bet you’ve encountered of an HTTP status code at some point in time. A dreadful 404 when the page is missing; 301/302 when you’re redirected to another page; or a good old 200 when you actually get to see the page. Well, I decided to do a translation of the meaning of some of most common HTTP codes into examples that non-techies can possibly relate to. Here we go!
Case I: Fetch me some Nutella?
a.k.a. Resource Retrieval: This use case covers codes you can encounter when retrieving resources from a server, e.g. getting tweets from the Twitter API.
You and your older sister are watching re-runs of the X-Files, and she asks you to fetch some Nutella from the fridge.
200, Ok You found the Nutella on the fridge.
202, Request Received You don’t wanna miss the episode, so you’ll get it later.
301, Temporary move The Nutella was on the kitchen table, because the fridge was being cleaned. But you got it.
302, Permanent move The Nutella is now stored in the upper cabinets, instead of the fridge. Still, you got it.
400, Bad Request “I think you’re forgetting the magic words.”
404, Not Found There is no Nutella.
500, Internal Server Error While running to the kitchen, cause you don’t want to miss the episode, you slip, hit the door, break a tooth, and end up at the dentist.
Case II: Can I get a raise?
a.k.a. Process Request: This use case covers situations where we send requests to ask the server to do something instead, e.g. search for a term in Google.
You’ve been an ardent employee for the past year. You’ve delivered when you weren’t expected to, and outperformed every expectation. So, you decide to ask for a raise
200, OK Sure thing Tim. It’s a done deal.
202, Accepted You know what Tim, I’d love to do that for you. Let me just put in a request to the higher ups, and hear what they say.
400, Bad Request Who are you again? You work for me?!
403, Forbidden Yea… not gonna happen.
500, Internal Server Error Tim, I’ve been meaning to talk to you. Year end is coming up, and I gotta submit reports. Since you can do your job in half the time it takes others, why don’t you switch to part-time, and help us cut costs?
I hope this makes HTTP codes easier to understand for non-techies. What about you? Do you have translations of your own you’d like to share?