Portability | portable |
---|---|
Stability | stable |
Maintainer | mukai@jmuk.org |
URI parser and utilities
- data URI = URI {}
- port' :: URI -> PortNumber
- uri :: String -> URI
- uri' :: ByteString -> URI
- escape :: [Word8] -> String
- unescape :: String -> String
- parseURI :: String -> Maybe URI
- parseURI' :: ByteString -> Maybe URI
- portToName :: PortNumber -> Maybe String
- nameToPort :: String -> Maybe PortNumber
Documentation
port' :: URI -> PortNumberSource
Obtain the port number for the URI. If no port number exists, port' would like to estimate the port number from the scheme name. If both failed, it raises an error.
uri' :: ByteString -> URISource
Parse URI string simiar to parseURI
. The difference is that it
raises an error for the case of parse failed, not returns Nothing.
parseURI :: String -> Maybe URISource
Parse URI string and returns the result. If the parse is failed, it simply returns Nothing.
parseURI' :: ByteString -> Maybe URISource