Idris2Doc : Web.Async.HTTP

Web.Async.HTTP

(source)

Definitions

dataMethod : Type
  HTTP methods currently supported.

Totality: total
Visibility: public export
Constructors:
GET : Method
POST : Method

Hints:
EqMethod
OrdMethod
ShowMethod
0Header : Type
  A HTTP header is just a pair of strings.

Totality: total
Visibility: public export
dataPart : Type
  Part in a formdata request.

Totality: total
Visibility: public export
Constructors:
StringPart : String->String->Part
FilePart : String->File->Part
dataRequestBody : Type
  Body of a HTTP request.

Totality: total
Visibility: public export
Constructors:
Empty : RequestBody
StringBody : String->String->RequestBody
JSONBody : ToJSONa=>a->RequestBody
FormBody : ListPart->RequestBody
dataHTTPError : Type
  HTTP Errors

Totality: total
Visibility: public export
Constructors:
Timeout : HTTPError
NetworkError : HTTPError
BadStatus : Bits16->HTTPError
JSONError : String->DecodingErr->HTTPError
dataExpect : 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 : FromJSONa=> (EitherHTTPErrora->r) ->Expectr
ExpectString : (EitherHTTPErrorString->r) ->Expectr
ExpectAny : (EitherHTTPError () ->r) ->Expectr
request : Sinkr=>Method->ListHeader->String->RequestBody->Expectr->MaybeBits32->IO1 (IO1 ())
  Sends a HTTP request.

Converts the response to an event of type `r`.

Totality: total
Visibility: export
get : Sinkr=>String->Expectr->IO1 (IO1 ())
  Send a GET HTTP request.

Totality: total
Visibility: export
getText : Sinkr=>String-> (EitherHTTPErrorString->r) ->IO1 (IO1 ())
  Send a GET request, reading the response as plain text.

Totality: total
Visibility: export
getJSON : Sinkr=>FromJSONt=>String-> (EitherHTTPErrort->r) ->IO1 (IO1 ())
  Send a GET request, decoding the result as a JSON string
and converting it to the result type `a`.

Totality: total
Visibility: export
post : Sinkr=>String->RequestBody->Expectr->IO1 (IO1 ())
  Send a POST request.

Totality: total
Visibility: export