final case class UriTemplate(scheme: Option[Scheme] = None, authority: Option[Authority] = None, path: Path = Nil, query: UriTemplate.Query = Nil, fragment: Fragment = Nil) extends Product with Serializable
Simple representation of a URI Template that can be rendered as RFC6570 conform string.
This model reflects only a subset of RFC6570.
Level 1 and Level 2 are completely modeled and Level 3 features are limited to:
- Path segments, slash-prefixed
- Form-style query, ampersand-separated
- Fragment expansion
- Source
- UriTemplate.scala
- Alphabetic
- By Inheritance
- UriTemplate
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
- val authority: Option[Authority]
-
def
expandAny[T](name: String, value: T)(implicit arg0: QueryParamEncoder[T]): UriTemplate
Replaces any expansion type that matches the given
name
.Replaces any expansion type that matches the given
name
. If no matchingexpansion
could be found the same instance will be returned. -
def
expandFragment[T](name: String, value: T)(implicit arg0: QueryParamEncoder[T]): UriTemplate
Replaces any expansion type in
fragment
that matches the givenname
.Replaces any expansion type in
fragment
that matches the givenname
. If no matchingexpansion
could be found the same instance will be returned.- Annotations
- @nowarn( value = "cat=unused" )
-
def
expandPath[T](name: String, value: T)(implicit arg0: QueryParamEncoder[T]): UriTemplate
Replaces any expansion type in
path
that matches the givenname
.Replaces any expansion type in
path
that matches the givenname
. If no matchingexpansion
could be found the same instance will be returned. -
def
expandPath[T](name: String, values: List[T])(implicit arg0: QueryParamEncoder[T]): UriTemplate
Replaces any expansion type in
path
that matches the givenname
.Replaces any expansion type in
path
that matches the givenname
. If no matchingexpansion
could be found the same instance will be returned. -
def
expandQuery[T](name: String, values: T*)(implicit arg0: QueryParamEncoder[T]): UriTemplate
Replaces any expansion type in
query
that matches the specifiedname
.Replaces any expansion type in
query
that matches the specifiedname
. If no matchingexpansion
could be found the same instance will be returned. -
def
expandQuery(name: String): UriTemplate
Replaces any expansion type in
query
that matches the specifiedname
.Replaces any expansion type in
query
that matches the specifiedname
. If no matchingexpansion
could be found the same instance will be returned. -
def
expandQuery[T](name: String, values: List[T])(implicit arg0: QueryParamEncoder[T]): UriTemplate
Replaces any expansion type in
query
that matches the specifiedname
.Replaces any expansion type in
query
that matches the specifiedname
. If no matchingexpansion
could be found the same instance will be returned. - val fragment: Fragment
- val path: Path
- val query: UriTemplate.Query
- val scheme: Option[Scheme]
- lazy val toString: String
-
def
toUriIfPossible: Try[Uri]
If no expansion is available an
Uri
will be created otherwise the current instance ofUriTemplate
will be returned.