Module Opium.Version
Protocol Version
HTTP uses a "<major>.<minor>" numbering scheme to indicate versions of the protocol. The protocol version as a whole indicates the sender's conformance with the set of requirements laid out in that version's corresponding specification of HTTP.
See RFC7230§2.6 for more details.
val compare : t -> t -> int
compare x y
returns0
if versionx
is equal to versiony
, a negative integer if versionx
is less than versiony
, and a positive integer if versionx
is greater than versiony
.
val to_string : t -> string
to_string t
returns a string representation of the versiont
.
val of_string : string -> t
of_string s
returns a version from its string representations
.
Utilities
val sexp_of_t : t -> Sexplib0.Sexp.t
sexp_of_t t
converts the requestt
to an s-expression
val pp : Stdlib.Format.formatter -> t -> unit
pp
formats the requestt
as an s-expression
val pp_hum : Stdlib.Format.formatter -> t -> unit
pp_hum
formats the requestt
as a standard HTTP request