Status Codes & HTTP headers

Harshana Samarasinghe
CodeX
Published in
3 min readJun 27, 2022
Photo by Ashwini Chaudhary(Monty) on Unsplash

Status Code 101 (Switching Protocols)

The requester has asked the server to switch protocols and the server has agreed to do so.

Status Code 102 (Processing (WebDAV; RFC 2518))

A WebDAV request may have several file operation-related sub-requests, which would take a while to finish. This code signifies that the request has been received and is being processed by the server. As a result, the client won’t time out and think the request was unsuccessful.

Status Code 200 (OK)

Depending on the request method used, the actual answer will vary. A response to a GET request will include an entity corresponding to the resource that was asked for. An entity describing or containing the action’s outcome will be included in the response to a POST request.

Status Code 201 (Created)

A new resource has been developed as a function of the request being approved.

Status Code 207 Multi-Status (WebDAV; RFC 4918)

According to how many sub-requests were made, the message body that follows by default is an XML message and may contain a number of separate response codes.

Status Code 301 (Moved Permanently)

Send this and any upcoming requests to the provided URI.

Status Code 303 (See Other (since HTTP/1.1))

By using GET technique, the response to the request can be retrieved under a different URI. The client should assume that the server has received the data when it is returned in response to a POST (or PUT/DELETE) and should send a new GET request to the specified URI.

Status Code 305 (Use Proxy (since HTTP/1.1))

The result contains the proxy’s address because that is the only way to access the requested resource. Many HTTP clients (including Mozilla Firefox and Internet Explorer) reject this status code for security concerns.The result contains the proxy’s address because that is the only way to access the requested resource. Many HTTP clients (including Mozilla Firefox and Internet Explorer) reject this status code for security concerns.

Status Code 306 (Switch Proxy)

Subsequent requests should utilize the chosen proxy, as was the original intent.

Status Code 307 (Temporary Redirect (since HTTP/1.1))

The request should be sent again with a different URI, but subsequent requests should continue to utilize the first URI. When republishing the original request, the request method cannot be modified, in contrast to how 302 was previously done. Using another POST request as an illustration, a POST request should be repeated.

Status Code 403 (Forbidden)

The server verified the request’s validity and that it made sense, but it is delaying taking any further action. This may be as a result of the user not having the required rights for a resource, needing some form of account, or doing an illegal action (e.g. creating a duplicate record where only one is allowed). This number is also frequently used when the server rejects authentication that was supplied in response to the WWW-Authenticate header field challenge. Don’t make the request again.

Status Code 404 (Not Found)

The requested resource was not found, but it could become available later. The user is free to make further requirements.

Status Code 505 (HTTP Version Not Supported)

The HTTP protocol version that was used in the request is not supported by the server.

--

--

Harshana Samarasinghe
CodeX
Writer for

“Truth can only be found in one place: the code.” - Associate Engineer — Java Technology at Virtusa Sri Lanka -