package piaf

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Piaf.ClientSource

Sourcetype t
Sourceval create : ?config:Config.t -> sw:Eio.Switch.t -> Eio_unix.Stdenv.base -> Uri.t -> (t, [> Error.client ]) result

create ?config uri opens a connection to uri (initially) that can be used to issue multiple requests to the remote endpoint.

A client instance represents a connection to a single remote endpoint, and the remaining functions in this module will issue requests to that endpoint only.

Sourceval head : t -> ?headers:(string * string) list -> string -> (Response.t, [> Error.t ]) result
Sourceval get : t -> ?headers:(string * string) list -> string -> (Response.t, [> Error.t ]) result
Sourceval post : t -> ?headers:(string * string) list -> ?body:Body.t -> string -> (Response.t, [> Error.t ]) result
Sourceval put : t -> ?headers:(string * string) list -> ?body:Body.t -> string -> (Response.t, [> Error.t ]) result
Sourceval patch : t -> ?headers:(string * string) list -> ?body:Body.t -> string -> (Response.t, [> Error.t ]) result
Sourceval delete : t -> ?headers:(string * string) list -> ?body:Body.t -> string -> (Response.t, [> Error.t ]) result
Sourceval request : t -> ?headers:(string * string) list -> ?body:Body.t -> meth:Method.t -> string -> (Response.t, [> Error.t ]) result
Sourceval send : t -> Request.t -> (Response.t, [> Error.t ]) result
Sourceval ws_upgrade : t -> ?headers:(string * string) list -> string -> (Ws.Descriptor.t, [> Error.t ]) result
Sourceval shutdown : t -> unit

shutdown t tears down the connection t and frees up all the resources associated with it.

Sourcemodule Oneshot : sig ... end
OCaml

Innovation. Community. Security.