Uri

object Uri extends UriInterpolator

For a general description of the behavior of apply, parse, safeApply and unsafeApply methods, see sttp.model.

For a general description of the behavior of apply, parse, safeApply and unsafeApply methods, see sttp.model.

The safeApply methods return a validation error if the scheme contains illegal characters or if the host is empty.

Companion
class
trait Product
trait Mirror
class Object
trait Matchable
class Any

Type members

Classlikes

case class AbsolutePath(segments: Seq[Segment]) extends PathSegments
case class Authority(userInfo: Option[UserInfo], hostSegment: Segment, port: Option[Int])
Companion
object
object Authority
Companion
class
case object EmptyPath extends PathSegments
object HostEncoding
object HostSegment
object PathSegment
sealed trait PathSegments
Companion
object
object PathSegments
Companion
class
sealed trait QuerySegment
Companion
object
object QuerySegment
Companion
class
case class RelativePath(segments: Seq[Segment]) extends PathSegments
case class Segment(v: String, encoding: Encoding)
case class UserInfo(username: String, password: Option[String])

Inherited classlikes

class UriContext(val sc: StringContext)
Inherited from
UriInterpolator

Types

type Encoding = String => String

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from
Mirror

Value members

Concrete methods

def apply(host: String): Uri
def apply(host: String, port: Int): Uri
def apply(host: String, port: Int, path: Seq[String]): Uri
def apply(scheme: String, path: Seq[String]): Uri
def apply(scheme: String, host: String): Uri
def apply(scheme: String, host: String, port: Int): Uri
def apply(scheme: String, host: String, port: Int, path: Seq[String]): Uri
def apply(scheme: String, host: String, path: Seq[String]): Uri
def apply(scheme: String, host: String, path: Seq[String], fragment: Option[String]): Uri
def apply(scheme: String, userInfo: Option[UserInfo], host: String, port: Option[Int], path: Seq[String], querySegments: Seq[QuerySegment], fragment: Option[String]): Uri
def apply(scheme: String, authority: Option[Authority], path: Seq[Segment], querySegments: Seq[QuerySegment], fragment: Option[Segment]): Uri
def apply(javaUri: URI): Uri
def parse(uri: String): Either[String, Uri]
def pathRelative(path: Seq[String]): Uri

Create a relative URI with a relative path.

Create a relative URI with a relative path.

def pathRelative(path: Seq[String], fragment: Option[String]): Uri

Create a relative URI with a relative path.

Create a relative URI with a relative path.

def pathRelative(path: Seq[String], querySegments: Seq[QuerySegment], fragment: Option[String]): Uri

Create a relative URI with a relative path.

Create a relative URI with a relative path.

def relative(path: Seq[String]): Uri

Create a relative URI with an absolute path.

Create a relative URI with an absolute path.

def relative(path: Seq[String], fragment: Option[String]): Uri

Create a relative URI with an absolute path.

Create a relative URI with an absolute path.

def relative(path: Seq[String], querySegments: Seq[QuerySegment], fragment: Option[String]): Uri

Create a relative URI with an absolute path.

Create a relative URI with an absolute path.

def safeApply(host: String): Either[String, Uri]
def safeApply(host: String, port: Int): Either[String, Uri]
def safeApply(host: String, port: Int, path: Seq[String]): Either[String, Uri]
def safeApply(scheme: String, path: Seq[String]): Either[String, Uri]
def safeApply(scheme: String, host: String): Either[String, Uri]
def safeApply(scheme: String, host: String, port: Int): Either[String, Uri]
def safeApply(scheme: String, host: String, port: Int, path: Seq[String]): Either[String, Uri]
def safeApply(scheme: String, host: String, path: Seq[String]): Either[String, Uri]
def safeApply(scheme: String, host: String, path: Seq[String], fragment: Option[String]): Either[String, Uri]
def safeApply(scheme: String, userInfo: Option[UserInfo], host: String, port: Option[Int], path: Seq[String], querySegments: Seq[QuerySegment], fragment: Option[String]): Either[String, Uri]
def safeApply(scheme: String, authority: Option[Authority], pathSegments: Seq[Segment], querySegments: Seq[QuerySegment], fragmentSegment: Option[Segment]): Either[String, Uri]
def unsafeApply(host: String): Uri
def unsafeApply(host: String, port: Int): Uri
def unsafeApply(host: String, port: Int, path: Seq[String]): Uri
def unsafeApply(scheme: String, path: Seq[String]): Uri
def unsafeApply(scheme: String, host: String): Uri
def unsafeApply(scheme: String, host: String, port: Int): Uri
def unsafeApply(scheme: String, host: String, port: Int, path: Seq[String]): Uri
def unsafeApply(scheme: String, host: String, path: Seq[String]): Uri
def unsafeApply(scheme: String, host: String, path: Seq[String], fragment: Option[String]): Uri
def unsafeApply(scheme: String, userInfo: Option[UserInfo], host: String, port: Option[Int], path: Seq[String], querySegments: Seq[QuerySegment], fragment: Option[String]): Uri
def unsafeApply(scheme: String, authority: Option[Authority], pathSegments: Seq[Segment], querySegments: Seq[QuerySegment], fragmentSegment: Option[Segment]): Uri
def unsafeParse(uri: String): Uri