Cosmetyc_native.Fetch
include Cosmetyc.Signatures.Fetch
module Promise : sig ... end
Fetching URL is not always done synchronously: they are usually embedded within a promise.
type error = {
status : int;
message : string;
}
An error message.
val fetch : ?using_method:string -> ?header:(string * string) list -> string -> (string, error) Stdlib.result Promise.t
Fetch a URL. Get in result either the content of the object, or an error message. The default using_method is GET, and the default header empty.
using_method