final case class AbsoluteUrl(scheme: String, authority: Authority, path: AbsoluteOrEmptyPath, query: QueryString, fragment: Option[String])(implicit config: UriConfig = UriConfig.default) extends UrlWithAuthority with Product with Serializable
Represents absolute URLs, for example: http://example.com
- Alphabetic
- By Inheritance
- AbsoluteUrl
- Serializable
- Serializable
- Product
- Equals
- UrlWithAuthority
- Url
- Uri
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new AbsoluteUrl(scheme: String, authority: Authority, path: AbsoluteOrEmptyPath, query: QueryString, fragment: Option[String])(implicit config: UriConfig = UriConfig.default)
Type Members
-
type
Self = AbsoluteUrl
- Definition Classes
- AbsoluteUrl → UrlWithAuthority → Url → Uri
-
type
SelfWithAuthority = Self
- Definition Classes
- UrlWithAuthority → Url
-
type
SelfWithScheme = AbsoluteUrl
- Definition Classes
- AbsoluteUrl → UrlWithAuthority → Url → Uri
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addParam(kv: (String, String)): Self
Adds a new Query String parameter key-value pair.
Adds a new Query String parameter key-value pair.
- kv
name-value pair for the query parameter to be added
- returns
A new Url with the new Query String parameter
- Definition Classes
- Url
-
def
addParam(name: String, value: String): Self
Adds a new Query String parameter key-value pair.
Adds a new Query String parameter key-value pair.
- name
name of the parameter
- value
value for the parameter
- returns
A new Url with the new Query String parameter
- Definition Classes
- Url
-
def
addParam(name: String, value: Option[String]): Self
Adds a new Query String parameter key-value pair.
Adds a new Query String parameter key-value pair.
Pairs with values, such as
Some("value")
, represent query params with values, i.e?param=value
By default, pairs without values, i.e
None
, represent query params without values, i.e?param
Using aUriConfig(renderQuery = ExcludeNones)
, will cause pairs withNone
values not to be rendered- name
name of the parameter
- value
value for the parameter
- returns
A new Url with the new Query String parameter
- Definition Classes
- Url
-
def
addParamOptionValue(kv: (String, Option[String])): Self
Adds a new Query String parameter key-value pair.
Adds a new Query String parameter key-value pair.
Pairs with values, such as
("param", Some("value"))
, represent query params with values, i.e?param=value
By default, pairs without values, such as
("param", None)
, represent query params without values, i.e?param
Using aUriConfig(renderQuery = ExcludeNones)
, will cause pairs withNone
values not to be rendered- kv
name-value pair for the query parameter to be added
- returns
A new Url with the new Query String parameter
- Definition Classes
- Url
-
def
addParams(kvs: GenTraversable[(String, String)]): Self
Adds all the specified key-value pairs as parameters to the query
Adds all the specified key-value pairs as parameters to the query
- kvs
A list of key-value pairs to add as query parameters
- returns
A new Url with the new Query String parameters
- Definition Classes
- Url
-
def
addParams(kvs: (String, String)*): Self
Adds all the specified key-value pairs as parameters to the query
Adds all the specified key-value pairs as parameters to the query
- kvs
A list of key-value pairs to add as query parameters
- returns
A new Url with the new Query String parameters
- Definition Classes
- Url
-
def
addParamsOptionValues(kvs: (String, Option[String])*): Self
Adds all the specified key-value pairs as parameters to the query
Adds all the specified key-value pairs as parameters to the query
Pairs with values, such as
("param", Some("value"))
, represent query params with values, i.e?param=value
By default, pairs without values, such as
("param", None)
, represent query params without values, i.e?param
Using aUriConfig(renderQuery = ExcludeNones)
, will cause pairs withNone
values not to be rendered- kvs
A list of key-value pairs to add as query parameters
- returns
A new Url with the new Query String parameters
- Definition Classes
- Url
-
def
addParamsOptionValues(kvs: GenTraversable[(String, Option[String])]): Self
Adds all the specified key-value pairs as parameters to the query
Adds all the specified key-value pairs as parameters to the query
Pairs with values, such as
("param", Some("value"))
, represent query params with values, i.e?param=value
By default, pairs without values, such as
("param", None)
, represent query params without values, i.e?param
Using aUriConfig(renderQuery = ExcludeNones)
, will cause pairs withNone
values not to be rendered- kvs
A list of key-value pairs to add as query parameters
- returns
A new Url with the new Query String parameters
- Definition Classes
- Url
-
def
addPathPart(part: String): Self
- Definition Classes
- Url
-
def
addPathParts(parts: String*): Self
- Definition Classes
- Url
-
def
addPathParts(parts: GenTraversableOnce[String]): Self
- Definition Classes
- Url
-
def
apexDomain: Option[String]
Returns the apex domain for this URL.
Returns the apex domain for this URL.
The apex domain is constructed from the public suffix for this URL's host prepended with the immediately preceding dot segment.
Examples include:
example.com
forwww.example.com
example.co.uk
forwww.example.co.uk
- returns
the apex domain for this URL
- Definition Classes
- Url
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
val
authority: Authority
- Definition Classes
- AbsoluteUrl → UrlWithAuthority
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
collectQuery(f: PartialFunction[(String, Option[String]), (String, Option[String])]): Self
Transforms the Query String by applying the specified PartialFunction to each Query String Parameter
Transforms the Query String by applying the specified PartialFunction to each Query String Parameter
Parameters not defined in the PartialFunction will be removed.
- f
A function that returns a new Parameter when applied to each Parameter
- Definition Classes
- Url
-
implicit
val
config: UriConfig
- Definition Classes
- AbsoluteUrl → Uri
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
filterQuery(f: ((String, Option[String])) ⇒ Boolean): Self
Removes any Query String Parameters that return false when applied to the given Function
Removes any Query String Parameters that return false when applied to the given Function
- Definition Classes
- Url
-
def
filterQueryNames(f: (String) ⇒ Boolean): Self
Removes any Query String Parameters that return false when their name is applied to the given Function
Removes any Query String Parameters that return false when their name is applied to the given Function
- Definition Classes
- Url
-
def
filterQueryValues(f: (String) ⇒ Boolean): Self
Removes any Query String Parameters that return false when their value is applied to the given Function
Removes any Query String Parameters that return false when their value is applied to the given Function
- Definition Classes
- Url
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flatMapQuery(f: ((String, Option[String])) ⇒ GenTraversableOnce[(String, Option[String])]): Self
Transforms the Query String by applying the specified Function to each Query String Parameter
Transforms the Query String by applying the specified Function to each Query String Parameter
- f
A function that returns a collection of Parameters when applied to each parameter
- Definition Classes
- Url
-
val
fragment: Option[String]
- Definition Classes
- AbsoluteUrl → Url
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
host: Host
- Definition Classes
- UrlWithAuthority
-
def
hostOption: Option[Host]
- Definition Classes
- UrlWithAuthority → Url
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
longestSubdomain: Option[String]
Returns the longest subdomain for this URL's host.
Returns the longest subdomain for this URL's host. E.g. for http://a.b.c.example.com returns a.b.c.example
- returns
the longest subdomain for this URL's host
- Definition Classes
- UrlWithAuthority → Url
-
def
mapQuery(f: PartialFunction[(String, Option[String]), (String, Option[String])]): Self
Transforms the Query String by applying the specified PartialFunction to each Query String Parameter
Transforms the Query String by applying the specified PartialFunction to each Query String Parameter
Parameters not defined in the PartialFunction will be left as-is.
- f
A function that returns a new Parameter when applied to each Parameter
- Definition Classes
- Url
-
def
mapQueryNames(f: (String) ⇒ String): Self
Transforms the Query String by applying the specified Function to each Query String Parameter name
Transforms the Query String by applying the specified Function to each Query String Parameter name
- f
A function that returns a new Parameter name when applied to each Parameter name
- Definition Classes
- Url
-
def
mapQueryValues(f: (String) ⇒ String): Self
Transforms the Query String by applying the specified Function to each Query String Parameter value
Transforms the Query String by applying the specified Function to each Query String Parameter value
- f
A function that returns a new Parameter value when applied to each Parameter value
- Definition Classes
- Url
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
password: Option[String]
- Definition Classes
- UrlWithAuthority → Url
-
val
path: AbsoluteOrEmptyPath
- Definition Classes
- AbsoluteUrl → Url → Uri
-
def
port: Option[Int]
- Definition Classes
- UrlWithAuthority → Url
-
def
publicSuffix: Option[String]
Returns the longest public suffix for the host in this URI.
Returns the longest public suffix for the host in this URI. Examples include:
com
forwww.example.com
co.uk
forwww.example.co.uk
- returns
the longest public suffix for the host in this URI
- Definition Classes
- UrlWithAuthority → Url
-
def
publicSuffixes: Vector[String]
Returns all longest public suffixes for the host in this URI.
Returns all longest public suffixes for the host in this URI. Examples include:
com
forwww.example.com
co.uk
anduk
forwww.example.co.uk
- returns
all public suffixes for the host in this URI
- Definition Classes
- UrlWithAuthority → Url
-
val
query: QueryString
- Definition Classes
- AbsoluteUrl → Url
-
def
removeParams(k: GenTraversableOnce[String]): Self
Removes all Query String parameters with a name in the specified list
Removes all Query String parameters with a name in the specified list
- k
Names of Query String parameter(s) to remove
- Definition Classes
- Url
-
def
removeParams(k: String*): Self
Removes all Query String parameters with a name in the specified list
Removes all Query String parameters with a name in the specified list
- k
Names of Query String parameter(s) to remove
- Definition Classes
- Url
-
def
removeParams(k: String): Self
Removes all Query String parameters with the specified key
Removes all Query String parameters with the specified key
- k
Key for the Query String parameter(s) to remove
- Definition Classes
- Url
-
def
removeQueryString(): Self
Removes all Query String parameters
Removes all Query String parameters
- Definition Classes
- Url
-
def
replaceParams(k: String, v: String): Self
Replaces the all existing Query String parameters with the specified key with a single Query String parameter with the specified value.
Replaces the all existing Query String parameters with the specified key with a single Query String parameter with the specified value.
- k
Key for the Query String parameter(s) to replace
- v
value to replace with
- returns
A new Uri with the result of the replace
- Definition Classes
- Url
-
def
replaceParams(k: String, v: Option[String]): Self
Replaces the all existing Query String parameters with the specified key with a single Query String parameter with the specified value.
Replaces the all existing Query String parameters with the specified key with a single Query String parameter with the specified value.
Pairs with values, such as
("param", Some("value"))
, represent query params with values, i.e?param=value
By default, pairs without values, such as
("param", None)
, represent query params without values, i.e?param
Using aUriConfig(renderQuery = ExcludeNones)
, will cause pairs withNone
values not to be rendered- k
Key for the Query String parameter(s) to replace
- v
value to replace with
- returns
A new Uri with the result of the replace
- Definition Classes
- Url
- val scheme: String
-
def
schemeOption: Option[String]
- Definition Classes
- AbsoluteUrl → Uri
-
def
self: AbsoluteUrl
- Definition Classes
- AbsoluteUrl → Uri
-
def
shortestSubdomain: Option[String]
Returns the shortest subdomain for this URL's host.
Returns the shortest subdomain for this URL's host. E.g. for http://a.b.c.example.com returns a
- returns
the shortest subdomain for this URL's host
- Definition Classes
- UrlWithAuthority → Url
-
def
subdomain: Option[String]
Returns the second largest subdomain for this URL's host.
Returns the second largest subdomain for this URL's host.
E.g. for http://a.b.c.example.com returns a.b.c
Note: In the event there is only one subdomain (i.e. the host is the apex domain), this method returns
None
. E.g. This method will returnNone
forhttp://example.com
.- returns
the second largest subdomain for this URL's host
- Definition Classes
- UrlWithAuthority → Url
-
def
subdomains: Vector[String]
Returns all subdomains for this URL's host.
Returns all subdomains for this URL's host. E.g. for http://a.b.c.example.com returns a, a.b, a.b.c and a.b.c.example
- returns
all subdomains for this URL's host
- Definition Classes
- UrlWithAuthority → Url
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toAbsoluteUrl: AbsoluteUrl
- Definition Classes
- Url
-
def
toJavaURI: URI
Converts to a
java.net.URI
Converts to a
java.net.URI
This involves a
toString
andURI.parse
because the specificjava.net.URI
constructors do not deal properly with encoded elements- returns
a
java.net.URI
matching thisio.lemonlabs.uri.Uri
- Definition Classes
- Uri
-
def
toProtocolRelativeUrl: ProtocolRelativeUrl
- Definition Classes
- Url
-
def
toRelativeUrl: RelativeUrl
- Definition Classes
- Url
-
def
toString(): String
- Definition Classes
- Uri → AnyRef → Any
-
def
toStringRaw: String
Returns the path with no encoders taking place (e.g.
Returns the path with no encoders taking place (e.g. non ASCII characters will not be percent encoded)
- returns
String containing the raw path for this Uri
- Definition Classes
- Uri
- def toUrl: Url
-
def
toUrlWithoutAuthority: UrlWithoutAuthority
- Definition Classes
- Url
- def toUrn: Urn
-
def
user: Option[String]
- Definition Classes
- UrlWithAuthority → Url
-
def
userInfo: UserInfo
- Definition Classes
- UrlWithAuthority
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
withAuthority(authority: Authority): AbsoluteUrl
Copies this Url but with the authority set as the given value.
Copies this Url but with the authority set as the given value.
- authority
the authority host to set
- returns
a new Url with the specified authority
- Definition Classes
- AbsoluteUrl → Url
-
def
withFragment(fragment: Option[String]): AbsoluteUrl
Copies this Url but with the fragment set as the given value.
Copies this Url but with the fragment set as the given value.
- fragment
the new fragment to set
- returns
a new Url with the specified fragment
- Definition Classes
- AbsoluteUrl → Url
-
def
withFragment(fragment: String): Self
Copies this Url but with the fragment set as the given value.
Copies this Url but with the fragment set as the given value.
- fragment
the new fragment to set
- returns
a new Url with the specified fragment
- Definition Classes
- Url
-
def
withHost(host: Host): Self
Copies this Url but with the host set as the given value.
Copies this Url but with the host set as the given value.
- host
the new host to set
- returns
a new Url with the specified host
- Definition Classes
- UrlWithAuthority → Url
-
def
withHost(host: String): SelfWithAuthority
Copies this Url but with the host set as the given value.
Copies this Url but with the host set as the given value.
- host
the new host to set
- returns
a new Url with the specified host
- Definition Classes
- Url
-
def
withPassword(password: String): Self
Copies this Url but with the password set as the given value.
Copies this Url but with the password set as the given value.
- password
the new password to set
- returns
a new Url with the specified password
- Definition Classes
- UrlWithAuthority
-
def
withPath(path: UrlPath): AbsoluteUrl
Copies this Url but with the path set as the given value.
Copies this Url but with the path set as the given value.
If the specified path is non empty *and* doesn't have a leading slash, one will be added, as per RFC 3986: When authority is present, the path must either be empty or begin with a slash ("/") character.
- path
the new path to set
- returns
a new Url with the specified path
- Definition Classes
- AbsoluteUrl → Url
-
def
withPort(port: Int): Self
Copies this Url but with the port set as the given value.
Copies this Url but with the port set as the given value.
- port
the new port to set
- returns
a new Url with the specified port
- Definition Classes
- UrlWithAuthority
-
def
withQueryString(query: QueryString): AbsoluteUrl
Copies this Url but with the query set as the given value.
Copies this Url but with the query set as the given value.
- query
the new QueryString to set
- returns
a new Url with the specified query
- Definition Classes
- AbsoluteUrl → Url
-
def
withQueryString(params: (String, String)*): Self
Replaces the all existing Query String parameters with a new set of query params
Replaces the all existing Query String parameters with a new set of query params
- Definition Classes
- Url
-
def
withQueryStringOptionValues(params: (String, Option[String])*): Self
Replaces the all existing Query String parameters with a new set of query params
Replaces the all existing Query String parameters with a new set of query params
Pairs with values, such as ("k", Some("v")), represent query params with values, i.e ?k=v Pairs without values, such as ("k", None), represent query params without values, i.e ?k
- Definition Classes
- Url
-
def
withScheme(scheme: String): AbsoluteUrl
Copies this Uri but with the scheme set as the given value.
Copies this Uri but with the scheme set as the given value.
- scheme
the new scheme to set
- returns
a new Uri with the specified scheme
- Definition Classes
- AbsoluteUrl → Uri
-
def
withUser(user: String): Self
Copies this Url but with the user set as the given value.
Copies this Url but with the user set as the given value.
- user
the new user to set
- returns
a new Url with the specified user
- Definition Classes
- UrlWithAuthority