205 Reset Content
The HTTP 205 Reset Content status code instructs the client to reset the document view. A document in this context is typically an HTML form. This response is similar to the 204 status code in having no message body.
Usage
The 205 Reset Content status code signals the server wants the client to clear all content on the current form. For a fillable form, this result follows pressing a "Clear" button instead of "Save".
Alternatively, a server sends the 204 status code. This indicates the same result, also with no message body, without specifically asking the client to reset the form.
Example
The client posts XML data to the server. The server acknowledges the data was received and processed, instructing the entry form to clear. The client allows subsequent entries on the same page, leading to new POST requests.
Request
POST /signup HTTP/1.1
Host: www.example.re
Content-Type: application/xml
Content-Length: 92
<?xml version="1.0"?>
<person>
<name>David Smith</name>
<country>USA</country>
</person>
Response
HTTP/1.1 205 Reset Content
Code references
.NET
HttpStatusCode.ResetContent
Rust
http::StatusCode::RESET_CONTENT
Rails
:reset_content
Go
http.StatusResetContent
Symfony
Response::HTTP_RESET_CONTENT
Python3.5+
http.HTTPStatus.RESET_CONTENT
Java
java.net.HttpURLConnection.HTTP_RESET
Apache HttpComponents Core
org.apache.hc.core5.http.HttpStatus.SC_RESET_CONTENT
Angular
@angular/common/http/HttpStatusCode.ResetContent
Takeaway
The HTTP 205 Reset Content status code confirms a request completed successfully and the client's document view needs to be cleared, preparing for new data entry.