Module GapiConversation
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 usingconfig
as configuration andcurl
as the initialized Ocurl wrapper, and executesinteract
in the context of the created session. Then it disposes the session, and returns the result ofinteract
.- 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 usingconfig
as configuration, and executesinteract
in the context of the created connection. Then it disposes the connection, and returns the result ofinteract
.- 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
type ('a, 'b) iter
=
|
Done of 'b
|
Continue of 'a -> ('a, 'b) iter
|
Error of string
val loop : ('a -> ('a, 'b) iter) -> 'a -> 'b