http-querystring-1.0: The HTTP query builder.

Safe HaskellNone

Network.HTTP.QueryString

Synopsis

Documentation

data QueryString Source

A query string for HTTP.

 "param1=value1&param2=value2"

queryString :: [(ByteString, ByteString)] -> QueryStringSource

Convert a parameter list to QueryString.

>>> toString $ queryString [("param1", "value1"), ("param2", "value2")]
"param1=value1&param2=value2"

queryStringFromMap :: Map ByteString ByteString -> QueryStringSource

Convert a parameter map to QueryString.

>>> import qualified Data.Map as Map
>>> toString $ queryStringFromMap $ Map.fromList [("param1", "value1"), ("param2", "value2")]
"param1=value1&param2=value2"