package fmlib_browser

  1. Overview
  2. Docs

Module Http.ExpectSource

Expected Response of an Http Request

Sourcetype 'a t
Sourceval string : string t

The response is expected to be a string and will not be decoded further.

Sourceval json : 'a Decoder.t -> 'a t

json decoder

The response is expected to be json and will be decoded with decoder.

Sourceval map : ('a -> 'b) -> 'a t -> 'b t

map f expect

Map the result of expect via the function f to produce a message. This is meant to be used in combination with Command.http_request.