Module Naboris.Req
Module for working with incoming requests.
val reqd : 'sessionData t -> Httpaf.Reqd.tGet HttpAf request descriptor.
val getHeader : string -> 'sessionData t -> string optionGet header from request.
Noneif no matching header is found.
val getBody : 'sessionData t -> string Lwt.tGet lwt promise of the body string from an http request.
val getSessionData : 'sessionData t -> 'sessionData optionExtracts
'sessionDatafrom request.Returns
Noneif no session exists.
val setSessionData : 'sessionData Session.t option -> 'sessionData t -> 'sessionData tSets
'sessionDataonto a request.
val fromReqd : Httpaf.Reqd.t -> 'sessionData SessionConfig.t option -> 'sessionData tIntended for internal use. Creates default req record.
val sidKey : 'sessionData t -> stringGet key for session id cookie
val maxAge : 'sessionData t -> intGet max age for session id cookies (in seconds)