UriTemplate

final case class UriTemplate(scheme: Option[Scheme], authority: Option[Authority], path: Path, query: Query, fragment: Fragment)

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
Companion
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def expandAny[T](name: String, value: T)(implicit evidence$1: QueryParamEncoder[T]): UriTemplate

Replaces any expansion type that matches the given name. If no matching expansion could be found the same instance will be returned.

Replaces any expansion type that matches the given name. If no matching expansion could be found the same instance will be returned.

def expandFragment[T](name: String, value: T)(implicit evidence$2: QueryParamEncoder[T]): UriTemplate

Replaces any expansion type in fragment that matches the given name. If no matching expansion could be found the same instance will be returned.

Replaces any expansion type in fragment that matches the given name. If no matching expansion could be found the same instance will be returned.

def expandPath[T](name: String, values: List[T])(implicit evidence$3: QueryParamEncoder[T]): UriTemplate

Replaces any expansion type in path that matches the given name. If no matching expansion could be found the same instance will be returned.

Replaces any expansion type in path that matches the given name. If no matching expansion could be found the same instance will be returned.

def expandPath[T](name: String, value: T)(implicit evidence$4: QueryParamEncoder[T]): UriTemplate

Replaces any expansion type in path that matches the given name. If no matching expansion could be found the same instance will be returned.

Replaces any expansion type in path that matches the given name. If no matching expansion could be found the same instance will be returned.

def expandQuery[T](name: String, values: List[T])(implicit evidence$5: QueryParamEncoder[T]): UriTemplate

Replaces any expansion type in query that matches the specified name. If no matching expansion could be found the same instance will be returned.

Replaces any expansion type in query that matches the specified name. If no matching expansion could be found the same instance will be returned.

def expandQuery(name: String): UriTemplate

Replaces any expansion type in query that matches the specified name. If no matching expansion could be found the same instance will be returned.

Replaces any expansion type in query that matches the specified name. If no matching expansion could be found the same instance will be returned.

def expandQuery[T](name: String, values: T*)(implicit evidence$6: QueryParamEncoder[T]): UriTemplate

Replaces any expansion type in query that matches the specified name. If no matching expansion could be found the same instance will be returned.

Replaces any expansion type in query that matches the specified name. If no matching expansion could be found the same instance will be returned.

def toUriIfPossible: Try[Uri]

If no expansion is available an Uri will be created otherwise the current instance of UriTemplate will be returned.

If no expansion is available an Uri will be created otherwise the current instance of UriTemplate will be returned.

Inherited methods

def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product

Concrete fields

lazy override val toString: String