Safe Haskell | None |
---|---|
Language | Haskell2010 |
Provides syntax for incrementally building Urls and components of Urls such as Query strings
Synopsis
- data QueryComponent
- newtype QueryBuilder = QueryBuilder {}
- class IsQueryVal a where
- toQueryVal :: a -> Text
- (</>) :: Url scheme -> Text -> Url scheme
- (?) :: Url scheme -> QueryBuilder -> Url scheme
- (&) :: QueryBuilder -> QueryBuilder -> QueryBuilder
- (=:) :: IsQueryVal a => Text -> a -> QueryBuilder
Documentation
data QueryComponent Source #
An individual Query Parameter or Query Flag
Instances
Eq QueryComponent Source # | |
Defined in Dormouse.Url.Builder (==) :: QueryComponent -> QueryComponent -> Bool # (/=) :: QueryComponent -> QueryComponent -> Bool # | |
Show QueryComponent Source # | |
Defined in Dormouse.Url.Builder showsPrec :: Int -> QueryComponent -> ShowS # show :: QueryComponent -> String # showList :: [QueryComponent] -> ShowS # |
newtype QueryBuilder Source #
Stores a series of Query Parameters or Query Flags used for building the Query component of a URI/URL, for example in the format ?param1=2¶m2=3&flag1
Instances
Eq QueryBuilder Source # | |
Defined in Dormouse.Url.Builder (==) :: QueryBuilder -> QueryBuilder -> Bool # (/=) :: QueryBuilder -> QueryBuilder -> Bool # | |
Show QueryBuilder Source # | |
Defined in Dormouse.Url.Builder showsPrec :: Int -> QueryBuilder -> ShowS # show :: QueryBuilder -> String # showList :: [QueryBuilder] -> ShowS # | |
Semigroup QueryBuilder Source # | |
Defined in Dormouse.Url.Builder (<>) :: QueryBuilder -> QueryBuilder -> QueryBuilder # sconcat :: NonEmpty QueryBuilder -> QueryBuilder # stimes :: Integral b => b -> QueryBuilder -> QueryBuilder # | |
Monoid QueryBuilder Source # | |
Defined in Dormouse.Url.Builder mempty :: QueryBuilder # mappend :: QueryBuilder -> QueryBuilder -> QueryBuilder # mconcat :: [QueryBuilder] -> QueryBuilder # |
class IsQueryVal a where Source #
Signifies a type that can be rendered as Query Parameter within a URI
toQueryVal :: a -> Text Source #
Instances
IsQueryVal Bool Source # | |
Defined in Dormouse.Url.Builder toQueryVal :: Bool -> Text Source # | |
IsQueryVal Char Source # | |
Defined in Dormouse.Url.Builder toQueryVal :: Char -> Text Source # | |
IsQueryVal Double Source # | |
Defined in Dormouse.Url.Builder toQueryVal :: Double -> Text Source # | |
IsQueryVal Float Source # | |
Defined in Dormouse.Url.Builder toQueryVal :: Float -> Text Source # | |
IsQueryVal Int Source # | |
Defined in Dormouse.Url.Builder toQueryVal :: Int -> Text Source # | |
IsQueryVal Integer Source # | |
Defined in Dormouse.Url.Builder toQueryVal :: Integer -> Text Source # | |
IsQueryVal Text Source # | |
Defined in Dormouse.Url.Builder toQueryVal :: Text -> Text Source # | |
IsQueryVal String Source # | |
Defined in Dormouse.Url.Builder toQueryVal :: String -> Text Source # |
(?) :: Url scheme -> QueryBuilder -> Url scheme infixl 8 Source #
Combine a Url with a some supplied query parameters
(&) :: QueryBuilder -> QueryBuilder -> QueryBuilder Source #
Convenient alias for <>
which allows for combining query parameters
(=:) :: IsQueryVal a => Text -> a -> QueryBuilder Source #
Generate a query paramter of the form key=value