modern-uri-0.3.6.1: Modern library for working with URIs
Copyright© 2017–present Mark Karpov
LicenseBSD 3 clause
MaintainerMark Karpov <markkarpov92@gmail.com>
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.URI.Lens

Description

Lenses for working with the URI data type and its internals.

Synopsis

Documentation

uriScheme :: Lens' URI (Maybe (RText 'Scheme)) Source #

URI scheme lens.

uriAuthority :: Lens' URI (Either Bool Authority) Source #

URI authority lens.

Note: before version 0.1.0.0 this lens allowed to focus on Maybe Authority.

uriPath :: Lens' URI [RText 'PathPiece] Source #

URI path lens.

isPathAbsolute :: Getter URI Bool Source #

A getter that can tell if path component of a URI is absolute.

Since: 0.1.0.0

uriTrailingSlash :: Traversal' URI Bool Source #

A 0-1 traversal allowing to view and manipulate trailing slash.

Since: 0.2.0.0

uriQuery :: Lens' URI [QueryParam] Source #

URI query params lens.

uriFragment :: Lens' URI (Maybe (RText 'Fragment)) Source #

URI fragment lens.

authHost :: Lens' Authority (RText 'Host) Source #

Authority host lens.

uiUsername :: Lens' UserInfo (RText 'Username) Source #

UserInfo username lens.

uiPassword :: Lens' UserInfo (Maybe (RText 'Password)) Source #

UserInfo password lens.

_QueryFlag :: Prism' QueryParam (RText 'QueryKey) Source #

QueryParam prism for query flags.

_QueryParam :: Prism' QueryParam (RText 'QueryKey, RText 'QueryValue) Source #

QueryParam prism for query parameters.

queryFlag :: RText 'QueryKey -> Getter [QueryParam] Bool Source #

Check if the given query key is present in the collection of query parameters.

queryParam :: RText 'QueryKey -> Traversal' [QueryParam] (RText 'QueryValue) Source #

Manipulate a query parameter by its key. Note that since there may be several query parameters with the same key this is a traversal that can return/modify several items at once.

unRText :: Getter (RText l) Text Source #

A getter that can project Text from refined text values.