Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Make.CThe S module gathers all the methods you need to be able to execute HTTP requests to contact an API server. It must send application/json request.
t contains the information about the token you are using to identify the client and the address of the server (URL).
val token : t -> stringtoken t returns the token associated with the data structure.
val address : t -> stringaddress t returns the address of the server.
val create :
address:string ->
?token:[ `Default | `Str of string | `Path of string ] ->
unit ->
tcreate ~address ~token () builds the configuration you are going to use to execute the request. If token is not provided, it will extract the token from the environment variable EQUINOXE_TOKEN.
get t ~path () executes a request to the server as a GET call and, returns the result as Json.t.
delete t ~path () executes a request to the server as a DELETE call and, returns the result as Json.t.