Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up[Question] Long running operations on 200 with a Retry-After VS other standards (e.g. w3.org) #76
Comments
|
@whozDougie I would recommend using RFC 7231 as the definitive source of information about status codes. Technically, someone could return a retry-after header with any status code. The specifications simply suggest common cases where it is used. You are correct that it is not common to return a retry-after with a 200 status code, but it is also not invalid. When it comes to writing retry-code, the main issues that should be of concern is if there is a retry-after header and whether the method is safe/unsafe. |
|
Thanks Darrel, that's made it clearer. |
Hi there,
I started following the guidelines for Long running operations on 200 with a Retry-After, however, I quickly found that other frameworks such as jQuery does not support 200 with a Retry-After.
An Article from Mozilla indicates that Retry-After is used with "413 Payload Too Large" and "503 Service Unavailable".
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
Also another article states the header can be used with 503 or 3XX: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
I'm not sure which standard / guideline is correct here, but I don't feel very confident with using 200 - unless I am missing something here.
Many thanks,
WhozDougie