package gapi-ocaml

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

Server conversation manager.

module Session : sig ... end

Defines the session that stores the current state of a conversation.

val request : ?header_list:GapiCore.Header.t list -> ?post_data:GapiCore.PostData.t -> ?media_download:GapiMediaResource.download -> GapiCore.HttpMethod.t -> Session.t -> string -> (GapiPipe.OcamlnetPipe.t -> int -> GapiCore.Header.t list -> Session.t -> 'a) -> 'a * Session.t
val with_session : ?auth_context:Session.auth_context -> GapiConfig.t -> [ `Initialized ] GapiCurl.t -> (Session.t -> 'a) -> 'a

Initializes a new session and executes a batch of requests to the server.

with_session config curl interact initializes a new session using config as configuration and curl as the initialized Ocurl wrapper, and executes interact in the context of the created session. Then it disposes the session, and returns the result of interact.

  • parameter auth_context

    Optional current authorization context. Defaults to NoAuth.

val with_curl : ?auth_context:Session.auth_context -> GapiConfig.t -> (Session.t -> 'a) -> 'a

Initializes a new connection to the server and executes a batch of requests.

with_curl config interact initializes a new connection using config as configuration, and executes interact in the context of the created connection. Then it disposes the connection, and returns the result of interact.

  • parameter auth_context

    Optional current authorization context. Defaults to NoAuth.

val read_all : ?auto_close:bool -> GapiPipe.OcamlnetPipe.t -> string

Reads a pipe until EOF.

  • parameter auto_close

    Closes the pipe after reading. Defaults to true.

val parse_error : GapiPipe.OcamlnetPipe.t -> int -> Session.t -> 'a
exception ConversationException of string
type ('a, 'b) iter =
  1. | Done of 'b
  2. | Continue of 'a -> ('a, 'b) iter
  3. | Error of string
val loop : ('a -> ('a, 'b) iter) -> 'a -> 'b
OCaml

Innovation. Community. Security.