package cohttp-eio
-
cohttp-eio
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
include Cohttp.Generic.Client.S
with type 'a with_context = t -> sw:Eio.Std.Switch.t -> 'a
and type 'a io = 'a
and type body = Body.t
type 'a with_context = t -> sw:Eio.Std.Switch.t -> 'a
type body = Body.t
val map_context : 'a with_context -> ('a -> 'b) -> 'b with_context
val call :
(?headers:Http.Header.t ->
?body:body ->
?chunked:bool ->
Http.Method.t ->
Uri.t ->
(Http.Response.t * body) io)
with_context
call ?headers ?body ?chunked meth uri
val head : (?headers:Http.Header.t -> Uri.t -> Http.Response.t io) with_context
val get :
(?headers:Http.Header.t -> Uri.t -> (Http.Response.t * body) io) with_context
val delete :
(?body:body ->
?chunked:bool ->
?headers:Http.Header.t ->
Uri.t ->
(Http.Response.t * body) io)
with_context
val post :
(?body:body ->
?chunked:bool ->
?headers:Http.Header.t ->
Uri.t ->
(Http.Response.t * body) io)
with_context
val put :
(?body:body ->
?chunked:bool ->
?headers:Http.Header.t ->
Uri.t ->
(Http.Response.t * body) io)
with_context
val patch :
(?body:body ->
?chunked:bool ->
?headers:Http.Header.t ->
Uri.t ->
(Http.Response.t * body) io)
with_context
val make :
https:
(Uri.t ->
[ `Generic ] Eio.Net.stream_socket_ty Eio.Std.r ->
_ Eio.Flow.two_way)
option ->
_ Eio.Net.t ->
t
make ~https net
is a convenience wrapper around make_generic
that uses net
to make connections.
https
(or rejected if that is None
).val make_generic :
(sw:Eio.Std.Switch.t -> Uri.t -> _ Eio.Net.stream_socket) ->
t
make_generic connect
is an HTTP client that uses connect
to get the connection to use for a given URI.