the-sett/elm-aws-core/4.1.0

NOTE: the latest version is 9.0.0

AWS.Core.KVEncode

KVEncode provides encoders to turn things into list of (String, String) which can be used to build headers or query parameters.

Sets of KV String tuples.

type KVPairs

Holds pairs of (String, String) tuples.

Encoders for simple types and dicts.

int : Int -> String

Encodes an Int as a String.

float : Float -> String

Encodes an Float as a String.

string : String -> String

Encodes a String (identity function).

bool : Bool -> String

Encodes an Bool as a String ("true" or "false").

dict : Dict String a -> (a -> String) -> KVPairs

Combines a Dict with a String encoder for its values into a set of KVPairs.

Encoders for records with optional fields or nesting.

field : (a -> String) -> ( String, a ) -> KVPairs

Encodes a pair of (String, a) into KVPairs.

optional : (a -> String) -> ( String, Maybe a ) -> KVPairs

Encodes a pair of (String, Maybe a) into KVPairs.

denest : List ( String, String ) -> KVPairs

Nested lists of (String, String) pairs may result from inner objects, this turns them into KVPairs that will be expanded into a flattened list.

kvlist : List KVPairs -> List ( String, String )

Lists sets of KVPairs into a flattened list of (String, String) pairs.