dormouse-uri-0.2.0.0: Library for type-safe representations of Uri/Urls
Safe HaskellNone
LanguageHaskell2010

Dormouse.Url.Builder

Description

Provides syntax for incrementally building Urls and components of Urls such as Query strings

Synopsis

Documentation

data QueryComponent Source #

An individual Query Parameter or Query Flag

Instances

Instances details
Eq QueryComponent Source # 
Instance details

Defined in Dormouse.Url.Builder

Show QueryComponent Source # 
Instance details

Defined in Dormouse.Url.Builder

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&param2=3&flag1

class IsQueryVal a where Source #

Signifies a type that can be rendered as Query Parameter within a URI

Methods

toQueryVal :: a -> Text Source #

Instances

Instances details
IsQueryVal Bool Source # 
Instance details

Defined in Dormouse.Url.Builder

Methods

toQueryVal :: Bool -> Text Source #

IsQueryVal Char Source # 
Instance details

Defined in Dormouse.Url.Builder

Methods

toQueryVal :: Char -> Text Source #

IsQueryVal Double Source # 
Instance details

Defined in Dormouse.Url.Builder

IsQueryVal Float Source # 
Instance details

Defined in Dormouse.Url.Builder

IsQueryVal Int Source # 
Instance details

Defined in Dormouse.Url.Builder

Methods

toQueryVal :: Int -> Text Source #

IsQueryVal Integer Source # 
Instance details

Defined in Dormouse.Url.Builder

IsQueryVal Text Source # 
Instance details

Defined in Dormouse.Url.Builder

Methods

toQueryVal :: Text -> Text Source #

IsQueryVal String Source # 
Instance details

Defined in Dormouse.Url.Builder

(</>) :: Url scheme -> Text -> Url scheme Source #

Combine a Url with a new text path component

(?) :: 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