Safe Haskell | None |
---|
- data QueryString
- toString :: QueryString -> ByteString
- queryString :: [(ByteString, ByteString)] -> QueryString
- queryStringFromMap :: Map ByteString ByteString -> QueryString
- parseQuery :: ByteString -> Maybe QueryString
Documentation
data QueryString Source
A query string for HTTP.
"param1=value1¶m2=value2"
queryString :: [(ByteString, ByteString)] -> QueryStringSource
Convert a parameter list to QueryString
.
>>>
toString $ queryString [("param1", "value1"), ("param2", "value2")]
"param1=value1¶m2=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¶m2=value2"