Replies: 1 comment
-
Ignore this - this was a bug in my code on the frontend. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have an HTTP call that updates the database, and then redirects to a page. A common use case is with InertiaJS, updating a resource, then redirecting back to the index page.
Imagine such:
T0: DELETE /object/1
T1: GET /object
I would expect that the "object" would not be present at the time of the HTTP call to GET /object. I am finding this is not the case, as the GET /object request executes (sometimes) before PUT /object.
I've verified this with a logging middleware timing the requests.
[22:38:54.503] [a68b067f-5ca8-4ecb-b666-794c7224d1b9] DELETE: /object/26
[22:38:54.506] [5f426fb4-cc52-4902-b9e2-5bceb0684a93] GET: /object
[22:38:54.540] [a68b067f-5ca8-4ecb-b666-794c7224d1b9] DELETE: /object/26 37.28625011444092ms - Completed
[22:38:54.542] [5f426fb4-cc52-4902-b9e2-5bceb0684a93] GET: /object 36.697083950042725ms - Completed
This GET request must have up-to-date information - is there a way to execute blocking before the redirect?
Beta Was this translation helpful? Give feedback.
All reactions