Module Client.Conn

include module type of struct include Async_uri end
type t = Async_uri.t = {
  1. s : ([ `Active ], Async.Socket.Address.Inet.t) Async.Socket.t;
  2. ssl : Async_ssl.Std.Ssl.Connection.t option;
  3. r : Async.Reader.t;
  4. w : Async.Writer.t;
}
val is_tls_url : Uri.t -> bool
val with_connection : ?version:Async_ssl.Version.t -> ?options:Async_ssl.Opt.t list -> ?buffer_age_limit:[ `At_most of Time_unix.Span.t | `Unlimited ] -> ?interrupt:unit Async.Deferred.t -> ?reader_buffer_size:int -> ?writer_buffer_size:int -> ?timeout:Time_unix.Span.t -> Uri.t -> (t -> 'a Async.Deferred.t) -> 'a Async.Deferred.t
module Persistent = Async_uri.Persistent
val listen_ssl : ?version:Async_ssl.Version.t -> ?options:Async_ssl.Opt.t list -> ?name:string -> ?allowed_ciphers:[ `Only of string list | `Openssl_default | `Secure ] -> ?ca_file:string -> ?ca_path:string -> ?verify_modes:Async_ssl.Verify_mode.t list -> crt_file:string -> key_file:string -> ?buffer_age_limit:Async.Writer.buffer_age_limit -> ?max_connections:int -> ?max_accepts_per_batch:int -> ?backlog:int -> ?socket: ([ `Unconnected ], [< Async_unix__.Unix_syscalls.Socket.Address.t ] as 'a) Async.Socket.t -> on_handler_error:[ `Call of 'a -> exn -> unit | `Ignore | `Raise ] -> ('a, 'b) Async.Tcp.Where_to_listen.t -> ('a -> Async_ssl.Std.Ssl.Connection.t -> Async.Reader.t -> Async.Writer.t -> unit Async.Deferred.t) -> ('a, 'b) Async.Tcp.Server.t Async.Deferred.t
include module type of struct include Conn end
val method_std : Http_types.Method.t -> Httpaf.Method.standard
val create_bigstring_list_reader : request_method:Httpaf.Method.standard -> fill_bigstring:(Core.Bigstring.t -> unit) -> fill_bigstring_list:(Core.Bigstring.t list -> unit) -> Httpaf.Response.t -> Httpaf.Body.Reader.t -> unit

Creates Httpaf.Body.Reader.t for a response depending on known body length.

val create_bigstring_pipe_reader : to_body:(Core.Bigstring.t -> 'a) -> 'b Async.Pipe.Writer.t -> Httpaf.Body.Reader.t -> unit
val create_ignore_reader : (unit -> unit) -> Httpaf.Body.Reader.t -> unit
val create_response_handler : how:Http_types.Body.How.t -> request_method:Http_types.Method.t -> (Httpaf.Response.t * Http_types.Body.t, 'a) Core.Result.t Async.Ivar.t -> Httpaf.Response.t -> Httpaf.Body.Reader.t -> unit

Construct a response handler taking into consideration the user suggestion on how he wants to receive the response. Right now we handle cases for `Ignore, `List `Bigstring and `Pipe `Bigstring.

If the response is of `Fixed size type, the response body will be a single Bigstring.t. If the response is `Chunked, the body can be piped or returned as a list or concatenated into a single Bigstring.t.

val buffer_size : int
val reader_loop : read_complete:unit Async.Ivar.t -> Httpaf.Client_connection.t -> Async.Reader.t -> unit Async.Deferred.t
val writer_loop : write_complete:unit Async.Ivar.t -> Httpaf.Client_connection.t -> Async.Writer.t -> unit
val request : ?timeout:Async_kernel__.Import.Time_ns.Span.t -> ?body:string -> ?read:Http_types.Body.How.t -> Httpaf.Request.t -> Async.Reader.t -> Async.Writer.t -> (Http_types.Response.t, [> `Connection_failure | `Raised of Core__.Import.Exn.t | `Timeout ]) Core._result Async_kernel__Deferred.t
val convert_request : body_length:int option -> Http_types.Request.t -> Httpaf.Request.t
val call : ?timeout:Async_kernel__.Import.Time_ns.Span.t -> Async_uri.t -> Http_types.Request.t -> (Http_types.Response.t, Http_types.Error.t) Async.Deferred.Result.t
val connect : Uri.t -> Async_uri.t Async.Deferred.t