package textrazor

  1. Overview
  2. Docs
type t = {
  1. api_key : string;
  2. secure : bool;
  3. use_eu_endpoint : bool;
}

Data structure for clients.

type response = (Yojson.Safe.t, string) Stdlib.result
val create : ?secure:bool -> ?use_eu_endpoint:bool -> string -> t

Creates a new client.

  • parameter secure

    Whether to use HTTPS. Defaults to true.

  • parameter use_eu_endpoint

    Whether to use TextRazor's Europe API endpoint. Defaults to false.

  • parameter api_key

    API key to use for requests

val get : string -> t -> response

Performs a GET request against the given path.

  • parameter path
  • parameter t
val post_form : string -> ?params:(string * string list) list -> t -> response

Performs a POST request against the given path.

  • parameter path
  • parameter params
  • parameter t
OCaml

Innovation. Community. Security.