Module Ppx_driver.Cookies

type t
val get : t ‑> Ppx_driver__.Import.string ‑> (Ppx_driver__.Import.expression'a ‑> 'a'bPpx_driver__.Import.Ast_pattern.t ‑> 'b Ppx_driver__.Import.option

get cookies name pattern look for a cookie named name and parse it using pattern.

val add_handler : (t ‑> Ppx_driver__.Import.unit) ‑> Ppx_driver__.Import.unit

Register a callback that is called before a rewriting. The handler is expected to lookup some cookies and set some environment variables.

This API is a temporary hack to allow to migrate from add_arg to the use of cookie, until the ppx_driver/ppx_core has been upgraded to pass cookies through.

val add_simple_handler : Ppx_driver__.Import.string ‑> (Ppx_driver__.Import.expression'a ‑> 'a'bPpx_driver__.Import.Ast_pattern.t ‑> f:('b Ppx_driver__.Import.option ‑> Ppx_driver__.Import.unit) ‑> Ppx_driver__.Import.unit

Shorthand for: add_handler (fun t -> f (get t name pattern))