Is it wrong to return 202 “Accepted” in response to HTTP GET?

If it’s for a well-defined and -documented API, 202 sounds exactly right for what’s happening.

If it’s for the public Internet, I would be too worried about client compatibility. I’ve seen so many if (status == 200) hard-coded…. In that case, I would return a 200.

Also, the RFC makes no indication that using 202 for a GET request is wrong, while it makes clear distinctions in other code descriptions (e.g. 200).

The request has been accepted for processing, but the processing has not been completed.

Leave a Comment