salvia-protocol-1.0.1: Salvia webserver protocol suite supporting URI, HTTP, Cookie and MIME.

Network.Protocol.Uri.Parser

Synopsis

Documentation

host :: Uri :-> StringSource

Access the host part of the URI.

path :: Uri :-> FilePathSource

Access the path part of the URI. The query will be properly decoded when reading and encoded when writing.

pathAndQuery :: Uri :-> StringSource

Access the path and query parts of the URI as a single string. The string will will be properly decoded when reading and encoded when writing.

toUri :: String -> UriSource

Parse string into a URI and ignore all failures by returning an empty URI when parsing fails. Can be quite useful in situations that parse errors are unlikely.

parseUri :: String -> Either ParseError UriSource

Parse string into a URI.

parseAbsoluteUri :: String -> Either ParseError UriSource

Parse string into a URI and only accept absolute URIs.

parseAuthority :: String -> Either ParseError AuthoritySource

Parse string into an authority.

parsePath :: String -> Either ParseError PathSource

Parse string into a path.

parseHost :: String -> Either ParseError HostSource

Parse string into a host.