A FormURLEncoded
datatype represents an ordered list of key-value pairs
with possible duplicates. encode
function allows to transform FormURLEncoded
into a string according to application/x-www-form-urlencoded
.
Documentation is available on Pursuit.
Example:
> import Data.FormURLEncoded (fromArray, encode)
> import Data.Maybe (Maybe(..))
> import Data.Tuple (Tuple(..))
> encode (fromArray [ Tuple "hey" Nothing
> , Tuple "Oh" (Just "Let's go!")
> ])
"hey&Oh=Let's%20go!"
Read the contribution guidelines to get started and see helpful related resources.