Example HTTP Response
HTTP/1.1 208 Already Reported
Content-Type: application/xml
<multistatus>...</multistatus>- WebDAV binding members already listed
- Avoiding duplicate entries in multi-status response
- Collection with multiple bindings
What does this mean?
Been there, done that! This resource was already mentioned earlier in the response. No need to repeat ourselves!
Technical Definition
Used inside a DAV: propstat response element to avoid enumerating the internal members of multiple bindings to the same collection repeatedly.
RFC Says
"The 208 (Already Reported) status code can be used inside a DAV:propstat response element to avoid enumerating the internal members of multiple bindings to the same collection repeatedly."
Plain English:
Used in WebDAV to avoid listing the same resource multiple times in a multi-status response. If a resource has already been reported in the response, 208 indicates 'we already covered this one.'
Ready-to-use code for returning this HTTP status in your application:
// Express.js
app.get('/example', (req, res) => {
res.status(208).json({
error: 'Already Reported',
message: 'Your error message here'
});
});
// Native HTTP
const http = require('http');
http.createServer((req, res) => {
res.writeHead(208, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({
error: 'Already Reported',
message: 'Your error message here'
}));
}).listen(3000);