package equinoxe-cohttp
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
This 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.
type 'a io = 'a Lwt.t
The I/O monad used to execute HTTP request.
val return : 'a -> 'a io
val fail : [ `Msg of string ] -> 'a io
val get : headers:(string * string) list -> url:string -> string io
get ~headers ~url
executes a request to the server as a GET
call and, returns the result as a string
.
val post : headers:(string * string) list -> url:string -> string -> string io
post ~headers ~url body
executes a request to the server as a POST
call using body
to describe the request. It returns the result as a string
.
val put : headers:(string * string) list -> url:string -> string -> string io
put ~headers ~url body
executes a request to the server as a PUT
call using body
to describe the request. It returns the result as a string
.
val delete : headers:(string * string) list -> url:string -> string io
delete ~headers ~url
executes a request to the server as a DELETE
call and returns the result as a string
.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>