205 Reset Content는 요청이 성공했으며, 클라이언트가 이 요청을 보낸 문서 뷰를 초기 상태로 되돌려야 함을 지시합니다. 대표적으로 입력 폼을 비워 다음 입력을 받을 준비를 시키는 용도입니다.
204 No Content와 비슷하게 본문이 없지만, 204가 "화면을 그대로 두라"는 뜻인 반면 205는 "폼/뷰를 리셋하라"는 능동적 지시라는 점이 다릅니다.
POST /survey HTTP/1.1
Host: example.com
Content-Type: application/x-www-form-urlencoded
rating=5&comment=GreatHTTP/1.1 205 Reset Content
Content-Length: 0app.post('/survey', (req, res) => {
saveSurvey(req.body);
res.status(205).end(); // tell client to clear the form
});@app.post('/survey')
def survey():
save(request.form)
return '', 205