val name : string -> namename s is a header name from s.
- raises Invalid_argument
if
sis not a field-name.
Header maps
val empty : headersempty is the empty header map.
val is_empty : headers -> boolis_empty hs is true iff hs is the empty header map.
find n hs is the value of header n in hs (if defined). If n is multi-valued and defined, we return String.concat "," vs where vs are values related to n in hs.
get n hs is like find but
- raises Invalid_argument
if
nis undefined inhs.
Header name values
val user_agent : nameUser-Agent.
val content_type : nameContent-Type.
val access_control_allow_origin : nameAccess-Control-Allow-Origin.
val access_control_allow_methods : nameAccess-Control-Allow-Methods.
val access_control_allow_headers : nameAccess-Control-Allow-Headers.
def_multi n vs hs is hs with n bound to the multi-value vs.
- raises Invalid_argument
if
vsis[].