Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Text.URI
- data URI = URI {}
- dereferencePath :: [String] -> [String]
- dereferencePathString :: String -> String
- escapeString :: (Char -> Bool) -> String -> String
- isReference :: URI -> Bool
- isRelative :: URI -> Bool
- nullURI :: URI
- okInFragment :: Char -> Bool
- okInPath :: Char -> Bool
- okInQuery :: Char -> Bool
- okInQueryItem :: Char -> Bool
- okInUserinfo :: Char -> Bool
- mergePaths :: [String] -> [String] -> [String]
- mergePathStrings :: String -> String -> String
- mergeURIs :: URI -> URI -> URI
- mergeURIStrings :: String -> String -> String
- pairsToQuery :: [(String, String)] -> String
- parseURI :: String -> Maybe URI
- pathToSegments :: String -> [String]
- segmentsToPath :: [String] -> String
- queryToPairs :: String -> [(String, String)]
- unescapeString :: String -> String
- uriPathSegments :: URI -> [String]
- uriQueryItems :: URI -> [(String, String)]
Documentation
data URI
Represents a general universal resource identifier using its component parts.
For example, for the URI
foo://anonymous@www.haskell.org:42/ghc?query#frag
the components are:
Constructors
URI | |
dereferencePath :: [String] -> [String]
Removes ".." and "." from path
dereferencePathString :: String -> String
dereferencePath for strings
escapeString :: (Char -> Bool) -> String -> String
Escapes string, using predicate to determine whether character is allowed
isReference :: URI -> Bool
Checks if uri is a reference
isRelative :: URI -> Bool
Checks if uri is relative
okInFragment :: Char -> Bool
Checks if character is OK in fragment
okInQueryItem :: Char -> Bool
Checks if character is OK in urlencoded query item
okInUserinfo :: Char -> Bool
Checks if character is OK in userinfo
mergePaths :: [String] -> [String] -> [String]
Merges two paths
mergePathStrings :: String -> String -> String
mergePaths for strings
mergeURIStrings :: String -> String -> String
mergeURIs for strings
pairsToQuery :: [(String, String)] -> String
Composes www-urlencoded query from key-value pairs
pathToSegments :: String -> [String]
Splits path to segments
segmentsToPath :: [String] -> String
Joins path segments, with escaping
queryToPairs :: String -> [(String, String)]
Parses www-urlencoded string to key-value pairs
unescapeString :: String -> String
Unescapes percent-sequences
uriPathSegments :: URI -> [String]
Convenience function for extracting path segments
uriQueryItems :: URI -> [(String, String)]
Convenience function for extracting www-urlencoded data