Example HTTP Response
HTTP/1.1 205 Reset Content- Form submission completed successfully
- Client should clear input fields
- Document view needs to be reset to original state
What does this mean?
Clean slate! The server says 'Got it!' and wants you to clear your form and start fresh. Like erasing the whiteboard after saving your notes.
Technical Definition
The server successfully processed the request and is asking the client to reset the document view.
RFC Says
"The 205 (Reset Content) status code indicates that the server has fulfilled the request and desires that the user agent reset the 'document view', which caused the request to be sent, to its original state as received from the origin server."
Plain English:
The request succeeded, and the server wants the client to reset the form or document view. Used after form submissions when you want the user to be able to immediately enter new data without manually clearing the form.
Ready-to-use code for returning this HTTP status in your application:
// Express.js
app.get('/example', (req, res) => {
res.status(205).json({
error: 'Reset Content',
message: 'Your error message here'
});
});
// Native HTTP
const http = require('http');
http.createServer((req, res) => {
res.writeHead(205, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({
error: 'Reset Content',
message: 'Your error message here'
}));
}).listen(3000);