package resto-cohttp-client

  1. Overview
  2. Docs

Client calls to services.

module type CALL = sig ... end

The minimal interface for building a client. Cohttp_lwt.S.Client is an instance of this signature, modulo some additional optional parameters that resto does not use. See OfCohttp below to obtain an exact intance based on Cohttp_lwt.S.Client.

type redirect_behaviour =
  1. | Do_not_follow_redirects
  2. | Follow_redirects of {
    1. limit : int;
    }

Whether or not an operation should follow redirects.

Given a limit, operations accepting a redirect_behaviour will follow up to that many redirects, inclusive, and fail with a Too_many_redirects error above that. If the limit parameter is negative, redirects will not be followed, just as if the behaviour were set to Do_not_follow_redirects, but the error will be Too_many_redirects instead.

module Make (Encoding : Resto.ENCODING) (Call : CALL) : sig ... end

Make(Encoding)(Client) is a module that allows you to make calls to various Resto (or EzResto) services.

OCaml

Innovation. Community. Security.