package brr

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Fetch.ResponseSource

Request responses.

Enumerations

Sourcemodule Type : sig ... end

Response type enum.

Responses

Sourcetype init

The type for response initialisation objects.

Sourceval init : ?headers:Headers.t -> ?status:int -> ?status_text:Jstr.t -> unit -> init

init () is a response initialisation object with given parameters.

Sourcetype t

The type for Response objects.

Sourceval v : ?init:init -> ?body:Body.init -> unit -> t

v ~init ~body is a response with parameters init and body body.

Sourceval of_response : t -> t

of_response r is a copy of r.

Sourceval error : unit -> t
Sourceval redirect : ?status:int -> Jstr.t -> t

redirect ~status url is a redirect response to url with status status.

Sourceval as_body : t -> Body.t

as_body r is the body interface of r.

Properties

Sourceval headers : t -> Headers.t

headers r are the headers of r.

Sourceval ok : t -> bool

ok r is true if the response r is successful.

Sourceval redirected : t -> bool

redirected r is true if the reponse is the result of a redirection.

Sourceval status : t -> int

status r is the status of r.

Sourceval status_text : t -> Jstr.t

status_text r is the status text of r.

Sourceval url : t -> Jstr.t

url r is the url of r.