-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IDEMPOTENCY] Restore section about stale success responses. #78
base: main
Are you sure you want to change the base?
Conversation
In this situation, the method **may** return the current state of the resource | ||
instead. In other words, it is permissible to substitute the historical success | ||
response with a similar response that reflects more current data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copying from #77 (comment) :
This behavior seems problematic, because such a response does not actually correlate with the request! What if the resource has subsequently been deleted, or made inaccessible? And even if the common case, how is a client to detect that they have received such a response?
Rather than silently replacing the no longer available appropriate response, I think it would be best to communicate that information. In HTTP terms, it would presumably be a 303 See Other response with a Location field identifying the URL to use for getting current state. And having provided that signal, it would then be possible as an optimization to also include that representation along with a Content-Location field, e.g.
HTTP/1.1 303 See Other
…
Location: /path/to/resource
Content-Location: /path/to/resource
<current representation>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unclear what this PR is for given that #77 was merged. Can we close it?
Co-authored-by: Richard Gibson <[email protected]>
No description provided.