DEV Community

Onwubiko Chibuike
Onwubiko Chibuike

Posted on

A Foodie's Guide To HTTP Response Status Code

For a foodie HTTP response status code can be easily understood if it is related to the one he/she loves, you guessed right, food. So today we will try to relate the meaning of common status codes to events relating to food.

What is HTTP response status code?

This is the response sent back by the server describing how a request was handled.

Success

  • 200 success: To a Foodie walking into a restaurant, ordering a meal and getting it, is a definition of what success means, and that is what this status code stands for making a request and also getting the adequate response.
  • 201 created: A foodie returns with groceries, gets their meal prepared for them or prepares it themselves.
  • 204 no content: A foodie walks into a restaurant and orders a meal, minutes later the waiter returns smiling, serves you the meal and then you discover that the plate is empty.

Client Error Responses

  • 400 bad request: A foodie walks into a vegan store and request for beef.
  • 401 unauthorized: A foodie tries to get into a food event without an invite.
  • 403 forbidden: A foodie attends a food event on a regular ticket and tries to get seated in a VIP position.
  • 404 not found: A foodie wants to eat but cannot find their food.

Server Error Responses

  • 500 internal server error: This occurs when a foodie sees a meal he/she can not come to terms with eating.

Top comments (0)