Closed bjmllr closed 4 years ago
Thank you for doing this! This is so exciting. I was able to confirm that a body is getting written in safari as well. I was not able to confirm that the body included the form data I had just entered. It gets cut off in the middle of the authenticity token. Were you able to see more than that? Either way, this feels like a breakthrough. Would love @bhaibel to take a look.
@LizPrescott the IndexedDB views in the debuggers don't seem to accommodate large blob values very well, but I was able to see the full body in Firefox by copying the value and pasting it somewhere else, and in Chrome by hovering the mouse pointer over the truncated body value.
Thanks for your patience. I see it now! This is extremely cool! LGTM!
Description
In order to replay a deferred request to add a record to the database, we need at least the url and method (to dispatch to the correct controller action), the headers (to satisfy authentication requirements), and the body. Before this change we only stored the url in indexeddb, and after this change we will also store the method, headers, and body.
A more general example can be seen at https://serviceworke.rs/request-deferrer_service-worker_doc.html (
function serialize
).Type of change
How Has This Been Tested?
/restoration_activity_log_entries/new
in a browser (I used Chromium v76) while the server is running to reload javascripts.Application
in Chrome orStorage
in Firefox). Click any refresh/reload controls as needed.Value
. Under therequest
key, you should see keysbody
,headers
,method
, andurl
with appropriate values.