package opium_kernel

  1. Overview
  2. Docs

Module Opium_kernel.CookieSource

Simple cookie module. Cookie values are percent encoded.

Sourceval cookies : Rock.Request.t -> (string * string) list

Fetch all cookies from a rock request

Sourceval get : Rock.Request.t -> key:string -> string option

Get the follow of a cookie with a certain key

Sourceval set : ?expiration:Cohttp.Cookie.expiration -> ?path:string -> ?domain:string -> ?secure:bool -> ?http_only:bool -> Rock.Response.t -> key:string -> data:string -> Rock.Response.t

Set the value of a cookie with a certain key in a response

Sourceval set_cookies : ?expiration:Cohttp.Cookie.expiration -> ?path:string -> ?domain:string -> ?secure:bool -> ?http_only:bool -> Rock.Response.t -> (string * string) list -> Rock.Response.t

Like set but will do multiple cookies at once

Rock middleware to add the the functionality above

OCaml

Innovation. Community. Security.