-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A library for working with URLs.
--
-- A library for working with URLs.
@package url
@version 1.0
-- | Provides a convinient way for working with HTTP URLs. Based on RFC
-- 1738.
module Network.URL
-- | A type for working with URL. The parameters are in
-- application/x-www-form-urlencoded format:
-- http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1
data URL
URL :: URLType -> String -> [(String, String)] -> URL
url_type :: URL -> URLType
url_path :: URL -> String
url_params :: URL -> [(String, String)]
-- | Different types of URL.
data URLType
-- | Has a host
Absolute :: Host -> URLType
-- | Does not have a host
HostRelative :: URLType
-- | Rleative to another URL
PathRelative :: URLType
-- | Contains information about the connection to the host.
data Host
Host :: Bool -> String -> Maybe Integer -> Host
secure :: Host -> Bool
host :: Host -> String
port :: Host -> Maybe Integer
-- | Convert a URL to a list of bytes. We represent non-ASCII
-- characters using UTF8.
exportURL :: URL -> String
-- | Convert a list of bytes to a URL.
importURL :: String -> Maybe URL
-- | Convert the host part of a URL to a list of bytes.
exportHost :: Host -> String
-- | Add a (key,value) parameter to a URL.
add_param :: URL -> (String, String) -> URL
-- | Decode a list of bytes to a string. Performs % and UTF8
-- decoding.
decString :: Bool -> String -> Maybe String
-- | Convert a string to bytes by escaping the characetrs that do not
-- satisfy the input predicate. The first argument specifies if we should
-- replace spaces with +.
encString :: Bool -> (Char -> Bool) -> String -> String
ok_host :: Char -> Bool
-- | Characters that may appear in the textual representation of a URL
ok_url :: Char -> Bool
ok_param :: Char -> Bool
-- | Characters that can appear non % encoded in the path part of the URL
ok_path :: Char -> Bool
instance Eq URL
instance Ord URL
instance Show URL
instance Eq URLType
instance Ord URLType
instance Show URLType
instance Eq Host
instance Ord Host
instance Show Host