Kind of a conceptual question here. In a Flask app, I'd like to introduce an intermediate confirmation page to the user, before firing the next complex action that requires the Flask request
object. If it were possible to store the original request
object in session, load the confirmation page, then upon confirmation, pull the original request
object out and execute a function based on it, that would be swell. But unless I'm missing something, Flask request
objects are not easily serializable, and thus, not easily stored in session, or other DB's.
The question proper: is it possible to somehow save a Flask request
object in all it's glory, perform an unrelated request / response cycle, then return to that original request
object? Or there is another pattern altogether that might be a better approach? I'd like to avoid picking out the relevant request
parameters and serializing those, as this will apply to a wide swath of pages, with very different inputs into the request.
Thought about before_request
functions in Flask, but the confirmation page needs user input, from a HTML rendered page. Any thoughts or suggestions would be greatly appreicated.