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 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
.
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
.
val read_all : ?auto_close:bool -> GapiPipe.OcamlnetPipe.t -> string
Reads a pipe until EOF.
val parse_error : GapiPipe.OcamlnetPipe.t -> int -> Session.t -> 'a
val loop : ('a -> ('a, 'b) iter) -> 'a -> 'b