Question:

Describe what HTTP status codes are. Explain the different HTTP status types and what the function of each one is.


HTTP Status Codes

When sending data or receiving data from a server it would be helpful to have a response letting you know that it was sent successfully like we are familar with the devices we use on a daily basis. You might know that you have received an email because your phone makes a sound; this is the same purpose of HTTP status codes to let you know when a request to the server was successful or if it wasn’t but can also notify you of other things which we will discuss next.

Types of Status Codes

  • 1xx Informational
    • codes starting with one means that request has been received and will continue
  • 2xx Success
    • starting with two means the action was received, understood and accepted
  • 3xx Redirection
    • starting with three means further action must be taken for the the request to be completed
  • 4xx Client Error
    • means request contains incorrect syntax or cannot be fufilled
  • 5xx Server Errror
    • means server failed to fulfill an apparently valid request


Summary

That was a quick overview on status codes, you should now be able to tell what category a code falls into by looking at the first number.