Common HTTP status codes you'll see on Web

ยท

2 min read

Common HTTP status codes you'll see on Web

Http status codes are a thing that we see a lot, in memes, while using a websites or while developing (whenever an api is involved).

So in this blog these are some common status codes you might encounter.

๐ŸŒŸ 200:

  • It is a standard OK status code. whenever server fulfills an http request. The response varies according to the request like GET or PUT

  • e.g, For GET request the response comes in message body which will the data which was requested

๐ŸŒŸ 204:

  • If server returns 204 code that means the request was fulfilled and there is no need for any data to return with response

  • e.g, For DELETE operation it returns the status code to confirm that request was fulfilled but than there is no need to return any data with it

๐ŸŒŸ 400:

  • This is an error code, returned whenever user tries to request something the server cannot process

  • This happens whenever user tries to request something that server does not know about or it is unconventional to the server

๐ŸŒŸ 401:

  • This status code is returned when user gives some kind of invalid authentication details

  • Generally happens when user tries to login with wrong username or password

๐ŸŒŸ 403:

  • A little similar to 401, this status code is returned when server pressed the request but user is not eligible to access the requested data

  • This happens when the username and password is correct but the user is authorized to access that data

๐ŸŒŸ 404:

  • The most common http status code known to end user,

  • This status code is returned when server cannot find the target resource that was requested

  • The code does not indicate that the resource is unavailable temporary or permanent.

If you want to learn more and different types of status code you can check out HTTPstatuscodes site

If you found the content i share useful than share it with your developer friends and also follow me on Instagram and Twitter

ย