data Method : Type HTTP methods currently supported.
Totality: total
Visibility: public export
Constructors:
GET : Method POST : Method
Hints:
Eq Method Ord Method Show Method
A HTTP header is just a pair of strings.
Totality: total
Visibility: public exportdata Part : Type Part in a formdata request.
Totality: total
Visibility: public export
Constructors:
StringPart : String -> String -> Part FilePart : String -> File -> Part
data RequestBody : Type Body of a HTTP request.
Totality: total
Visibility: public export
Constructors:
Empty : RequestBody StringBody : String -> String -> RequestBody JSONBody : ToJSON a => a -> RequestBody FormBody : List Part -> RequestBody
data HTTPError : Type HTTP Errors
Totality: total
Visibility: public export
Constructors:
Timeout : HTTPError NetworkError : HTTPError BadStatus : Bits16 -> HTTPError JSONError : String -> DecodingErr -> HTTPError
data Expect : Type -> Type Type of expected respons.
Every constructor takes a function for wrapping a request
result of type `Either HTTPError x` into the result type.
Totality: total
Visibility: public export
Constructors:
ExpectJSON : FromJSON a => (Either HTTPError a -> r) -> Expect r ExpectString : (Either HTTPError String -> r) -> Expect r ExpectAny : (Either HTTPError () -> r) -> Expect r
request : Method -> List Header -> String -> RequestBody -> Expect r -> Maybe Bits32 -> Cmd r Sends a HTTP request.
Converts the response to an event of type `r`.
Totality: total
Visibility: exportget : String -> Expect r -> Cmd r Send a GET HTTP request.
Totality: total
Visibility: exportgetText : String -> (Either HTTPError String -> r) -> Cmd r Send a GET request, reading the response as plain text.
Totality: total
Visibility: exportgetJSON : FromJSON a => String -> (Either HTTPError a -> r) -> Cmd r Send a GET request, decoding the result as a JSON string
and converting it to the result type `a`.
Totality: total
Visibility: exportpost : String -> RequestBody -> Expect r -> Cmd r Send a POST request.
Totality: total
Visibility: export