sihl
sihl copied to clipboard
Extend session API
Various functions in web_session.ml
can only be used for either Response.t
or Request.t
, for example val find : ... -> Request.t -> string option
. For symmetry purposes, extend the API so all these functions have duals, one for requests and one for responses (where it makes sense).
Additionally, rethink the semantic for set_value
, as it currently also takes a request. Should the session be maintained this way? An alternative is to just delete the request argument and leave that handling to the user. Find out what's more ergonomic.