HTTP 202 Accepted vs 205 Reset Content
Both HTTP 202 (Accepted) and 205 (Reset Content) belong to the 2xx Success category. 202 indicates that the request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon. Meanwhile, 205 means that the server fulfilled the request and the client should reset the document view (e.g., clear a form).
คำอธิบาย
The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon.
เมื่อคุณพบเห็น
For async operations like batch jobs, email sending, or background tasks that take time to complete.
วิธีแก้ไข
Poll the provided status URL or wait for a callback/webhook.
คำอธิบาย
The server fulfilled the request and the client should reset the document view (e.g., clear a form).
เมื่อคุณพบเห็น
After form submissions where the server wants the client to reset the form for new input.
วิธีแก้ไข
The client should clear the form or reset the view. Rarely used in practice.
ความแตกต่างหลัก
HTTP 202: The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon.
HTTP 205: The server fulfilled the request and the client should reset the document view (e.g., clear a form).
You encounter 202 when for async operations like batch jobs, email sending, or background tasks that take time to complete.
You encounter 205 when after form submissions where the server wants the client to reset the form for new input.
ควรใช้อันไหนเมื่อไร
For 202 (Accepted): Poll the provided status URL or wait for a callback/webhook. For 205 (Reset Content): The client should clear the form or reset the view. Rarely used in practice.