sihl icon indicating copy to clipboard operation
sihl copied to clipboard

Extend session API

Open aronerben opened this issue 3 years ago • 0 comments

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.

aronerben avatar Nov 18 '21 14:11 aronerben