-- 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 2.1.2
-- | Provides a convenient way for working with HTTP URLs. Based on RFC
-- 1738. See also: RFC 3986
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
-- | Relative to another URL
PathRelative :: URLType
-- | Contains information about the connection to the host.
data Host
Host :: Protocol -> String -> Maybe Integer -> Host
protocol :: Host -> Protocol
host :: Host -> String
port :: Host -> Maybe Integer
-- | The type of known protocols.
data Protocol
HTTP :: Bool -> Protocol
FTP :: Bool -> Protocol
RawProt :: String -> Protocol
-- | Does this host use a "secure" protocol (e.g., https).
secure :: Host -> Bool
-- | Is this a "secure" protocol. This works only for known protocols, for
-- RawProt values we return False.
secure_prot :: Protocol -> Bool
-- | 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 characters 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
exportParams :: [(String, String)] -> String
importParams :: String -> Maybe [(String, String)]
instance Eq Protocol
instance Ord Protocol
instance Show Protocol
instance Eq Host
instance Ord Host
instance Show Host
instance Eq URLType
instance Ord URLType
instance Show URLType
instance Eq URL
instance Ord URL
instance Show URL