Does http4k has any way to emulate the "flash" fea...
# http4k
m
Does http4k has any way to emulate the "flash" feature of Flask (set a value/message which can be retrieved by the next request)? https://flask.palletsprojects.com/en/3.0.x/api/#message-flashing
Ah, there is
Response.withFlash()
and
Request.flash()
, which does the job. Couldn't find that in docs though.
However, I get this warning in Firefox when using `Response.withFlash()`:
Copy code
Cookie "flash-cookie" does not have a proper "SameSite" attribute value. Soon, cookies without the "SameSite" attribute or with an invalid value will be treated as "Lax". This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the "SameSite=None" attribute to it. To know more about the "SameSite" attribute, read <https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite>