the-sett/elm-aws-core/2.0.0

NOTE: the latest version is 9.0.0

AWS.Core.Encode

Helper functions for building AWS calls.

Helpers

Bool
-> (a -> List ( String, String ) -> List ( String, String ))
-> String
-> List a
-> List ( String, String )
-> List ( String, String )

Adds a list of key/value pairs to another list, optioanlly flattening them.

(a -> String)
-> String
-> Dict String a
-> List ( String, String )
-> List ( String, String )

Adds a dict of key/value pairs to another list.

(a -> String)
-> String
-> a
-> List ( String, String )
-> List ( String, String )

Adds a key value pair to a list.

(record -> List ( String, String ))
-> String
-> record
-> List ( String, String )
-> List ( String, String )

Adds a record of key/value pairs to a list.

bool : Bool -> String

Turn a bool into a stirng.

(a -> b)
-> ( String, Maybe a )
-> List ( String, b )
-> List ( String, b )

Adds an optional key/value pair to a list.

unchangedQueryArgs : List ( String, String ) -> List ( String, String )

Identity function

uri : String -> String

We don't use Http.encodeUri because it misses some characters. It uses the native encodeURIComponent under the hood:

encodeURIComponent escapes all characters except the following:
alphabetic, decimal digits, - _ . ! ~ * ' ( )


- from https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent

For AWS only "Unreserved Characters" are allowed. See http://tools.ietf.org/html/rfc3986 Section 2.3

So basically we need to also cover: ! * ' ( )