Idris2Doc : HTTP.API.Decode

HTTP.API.Decode

(source)

Definitions

dataDecodeErr : Type
  Error type that occurs when decoding a value or other piece of
information.

Totality: total
Visibility: public export
Constructors:
ReadErr : String->String->String->DecodeErr
  A `ReadErr` typically occurs when reading a single value
from a string or bytestring.

@type : String description of the type we tried to read
@value : The string from which the value should be read
@details : Additional information about why reading the value failed.
ContentErr : String->String->DecodeErr
  A `ContentErr` is - in general - a more technical error that happend
when parsing the body of a message. The `details` field typically
holds the detailed description from the parser about what went
actually wrong.
Msg : String->DecodeErr
  An arbitrary custom error message.

Hints:
EqDecodeErr
FromJSONDecodeErr
InterpolationDecodeErr
ShowDecodeErr
ToJSONDecodeErr
readErr : String->ByteString->DecodeErr
  Utility constructor for `ReadErr`.

Totality: total
Visibility: export
contentErr : String->Interpolationa=>a->DecodeErr
  Utility constructor for `ContentErr`.

Totality: total
Visibility: export
setType : String->DecodeErr->DecodeErr
  Adjusts the `type` field of a decode error.

Totality: total
Visibility: export
setValue : String->DecodeErr->DecodeErr
  Adjusts the `type` field of a decode error.

Totality: total
Visibility: export
modMsg : (String->String) ->DecodeErr->DecodeErr
  Adjusts the `message` or `details` field of a decode error.

Totality: total
Visibility: export
decodeErr : Status->DecodeErr->RequestErr
Totality: total
Visibility: export
interfaceDecode : Type->Type
  An interface for decoding value from a sequence of raw bytes.

Parameters: a
Methods:
decode : ByteString->EitherDecodeErra

Implementations:
DecodeByteString
DecodeString
DecodeNat
DecodeInteger
DecodeBits8
DecodeBits16
DecodeBits32
DecodeBits64
DecodeInt8
DecodeInt16
DecodeInt32
DecodeInt64
DecodeDouble
DecodeOAuthToken
decode : Decodea=>ByteString->EitherDecodeErra
Totality: total
Visibility: public export
decodeAs : (0a : Type) ->Decodea=>ByteString->EitherDecodeErra
  Utiliy alias for `decode` that allows to explicitly specify the
target type.

Totality: total
Visibility: public export
interfaceDecodeMany : Type->Type
  An interface for decoding values by reading a prefix
of a list of bytestrings such as a path in a URL.

Parameters: a
Methods:
simulateDecode : ListByteString->Maybe (ListByteString)
decodeMany : ListByteString->EitherDecodeErr (ListByteString, a)

Implementations:
Decodea=>DecodeManya
Decodea=>DecodeMany (SnocLista)
Decodea=>DecodeMany (Lista)
All (DecodeMany.f) ts=>DecodeMany (Allfts)
DecodeManya=>DecodeMany (Vectna)
simulateDecode : DecodeManya=>ListByteString->Maybe (ListByteString)
Totality: total
Visibility: public export
decodeMany : DecodeManya=>ListByteString->EitherDecodeErr (ListByteString, a)
Totality: total
Visibility: public export
decodeAll : SnocLista->Decodea->ListByteString->EitherDecodeErr (ListByteString, SnocLista)
Totality: total
Visibility: export
interfaceDecodeVia : Type->Type->Type
Parameters: from, to
Methods:
fromBytes : Parameters->ByteString->EitherDecodeErrfrom
decodeFrom : from->EitherDecodeErrto
mediaType : MediaType

Implementations:
FromJSONa=>DecodeViaJSONa
FromFormDataa=>DecodeViaFormDataa
fromBytes : DecodeViafromto=>Parameters->ByteString->EitherDecodeErrfrom
Totality: total
Visibility: public export
decodeFrom : DecodeViafromto=>from->EitherDecodeErrto
Totality: total
Visibility: public export
mediaType : DecodeViafromto=>MediaType
Totality: total
Visibility: public export
decodeVia : DecodeViafromto=>Parameters->ByteString->EitherDecodeErrto
Totality: total
Visibility: export
interfaceFromFormData : Type->Type
Parameters: a
Methods:
fromFormData : FormData->EitherDecodeErra
fromFormData : FromFormDataa=>FormData->EitherDecodeErra
Totality: total
Visibility: public export
getFDBytes : String->FormData->EitherDecodeErrByteString
Totality: total
Visibility: export
refinedEither : Decodea=>String-> (a->EitherStringb) ->ByteString->EitherDecodeErrb
Totality: total
Visibility: export
refined : Decodea=>String-> Lazy String-> (a->Maybeb) ->ByteString->EitherDecodeErrb
Totality: total
Visibility: export
bounded : (0a : Type) ->Decodea=>Orda=>Castab=>String->a->a->ByteString->EitherDecodeErrb
Totality: total
Visibility: export
decodeTest : (0a : Type) ->Decodea=>Showa=>String->IO ()
  Testing facility for value decoding.

Example usage at the REPL:

```
:exec decodeTest Double "12.112"
```

Totality: total
Visibility: export
decodeManyTest : (0a : Type) ->DecodeManya=>Showa=>String->IO ()
  Testing facility for path decoding.

Example usage at the REPL:

```
:exec decodeTest (Vect 3 Nat) "https://www.hock.com/1/2/3?foo=bar"
```

Totality: total
Visibility: export