package quests

  1. Overview
  2. Docs

Module Quests.SessionSource

Sessions can be used to make multiple requests to a host that share the underlying TCP connection. Requests with sessions are made in the same way as ones without, with Quests.get replaced by Session.get a_session.

Sourcetype t
Sourceval create : ?max_pool_size:int -> unit -> t

Create a session with a maximum of max_pool_size connections per host.

Sourceval request : t -> Cohttp.Code.meth -> ?params:(string * string) list -> ?data:Request.payload -> ?headers:(string * string) list -> ?auth:Request.authentication -> ?follow_redirects:bool -> string -> Response.t Lwt.t
Sourceval get : t -> ?params:(string * string) list -> ?data:Request.payload -> ?headers:(string * string) list -> ?auth:Request.authentication -> ?follow_redirects:bool -> string -> Response.t Lwt.t
Sourceval post : t -> ?params:(string * string) list -> ?data:Request.payload -> ?headers:(string * string) list -> ?auth:Request.authentication -> ?follow_redirects:bool -> string -> Response.t Lwt.t
Sourceval put : t -> ?params:(string * string) list -> ?data:Request.payload -> ?headers:(string * string) list -> ?auth:Request.authentication -> ?follow_redirects:bool -> string -> Response.t Lwt.t
Sourceval delete : t -> ?params:(string * string) list -> ?data:Request.payload -> ?headers:(string * string) list -> ?auth:Request.authentication -> ?follow_redirects:bool -> string -> Response.t Lwt.t
Sourceval max_pool_size : t -> int
Sourceval reset : t -> unit Lwt.t

Close all connections in the session.

Sourceval close : t -> unit Lwt.t

A synonym for reset.