Module Http.Expect

Expected Response of an Http Request

type 'a t
val string : string t

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

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

json decoder

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

val 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.