Kurl.Bare
Bare URL requests.
val v : ?ext:string -> ?query:Webs.Http.query -> Webs.Http.meth -> Webs.Http.path -> bare
See bare
.
val meth : bare -> Webs.Http.meth
meth u
is the HTTP method of u
.
val path : bare -> Webs.Http.path
path u
is the URL path of u
.
val query : bare -> Webs.Http.query
query u
is the URL query of u
.
val ext : bare -> string
ext u
is the optional URL path file extension of u
. This is used by some URL formatting modes.
val with_path : Webs.Http.path -> bare -> bare
with_path p b
is b
with path p
.
val of_req : ?ext:string -> Webs.Http.req -> bare
of_req ~ext r
is a bare URL request from r
. Bare.meth
is Req
.meth, Bare.path
is Req
.path, Bare.query
is parsed Req
.query, ext
defaults to ""
.
val of_req_referer : ?ext:string -> ?meth:Webs.Http.meth -> Webs.Http.req -> (bare, string) Stdlib.result
of_req_referer ~ext r
is a bare URL request from r
. Bare.meth
is meth
(defaults to Req
.meth r), Bare.path
and Bare.query
are derived from the Http
.referer header. Errors if r
has no such header or if its parsing fails.
val pp : Stdlib.Format.formatter -> bare -> unit
pp ppf b
formats an unspecified representation of b
on ppf
.