Packages

  • package root
    Definition Classes
    root
  • package sttp
    Definition Classes
    root
  • package model

    Most model classes contain both serialisation & parsing functionality, following these conventions:

    Most model classes contain both serialisation & parsing functionality, following these conventions:

    • .toString returns a representation of the model class in a format as in an HTTP request/response. For example, for an uri this will be http://..., for a header [name]: [value], etc.
    • [SthCompanionObject].parse(serialized: String): Either[String, Sth]: returns an error message or an instance of the model class
    • [SthCompanionObject].unsafeParse(serialized: String): Sth: returns an instance of the model class or in case of an error, *throws an exception*.
    • [SthCompanionObject].unsafeApply(values): creates an instance of the model class; validates the input values and in case of an error, *throws an exception*. An error could be e.g. that the input values contain characters outside of the allowed range
    • [SthCompanionObject].safeApply(...): Either[String, Sth]: same as above, but doesn't throw exceptions. Instead, returns an error message or the model class instance
    • [SthCompanionObject].apply(...): Sth: creates the model type, without validation, and without throwing exceptions
    Definition Classes
    sttp
  • package headers
    Definition Classes
    model
  • package internal
    Definition Classes
    model
  • package sse
    Definition Classes
    model
  • ContentTypeRange
  • HasHeaders
  • Header
  • HeaderNames
  • Headers
  • MediaType
  • MediaTypes
  • Method
  • Methods
  • Part
  • QueryParams
  • RequestMetadata
  • ResponseMetadata
  • StatusCode
  • StatusCodes
  • Uri
  • UriInterpolator

object Uri extends UriInterpolator with Serializable

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.

Linear Supertypes
Serializable, Serializable, UriInterpolator, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Uri
  2. Serializable
  3. Serializable
  4. UriInterpolator
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class AbsolutePath(segments: Seq[Segment]) extends PathSegments with Product with Serializable
  2. case class Authority(userInfo: Option[UserInfo], hostSegment: Segment, port: Option[Int]) extends Product with Serializable
  3. type Encoding = (String) ⇒ String
  4. sealed trait PathSegments extends AnyRef
  5. sealed trait QuerySegment extends AnyRef
  6. case class RelativePath(segments: Seq[Segment]) extends PathSegments with Product with Serializable
  7. case class Segment(v: String, encoding: Encoding) extends Product with Serializable
  8. case class UserInfo(username: String, password: Option[String]) extends Product with Serializable
  9. implicit class UriContext extends AnyRef
    Definition Classes
    UriInterpolator

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply(javaUri: URI): Uri
  5. def apply(scheme: String, authority: Option[Authority], path: Seq[Segment], querySegments: Seq[QuerySegment], fragment: Option[Segment]): Uri
  6. def apply(scheme: String, userInfo: Option[UserInfo], host: String, port: Option[Int], path: Seq[String], querySegments: Seq[QuerySegment], fragment: Option[String]): Uri
  7. def apply(scheme: String, host: String, path: Seq[String], fragment: Option[String]): Uri
  8. def apply(scheme: String, host: String, path: Seq[String]): Uri
  9. def apply(scheme: String, host: String, port: Int, path: Seq[String]): Uri
  10. def apply(scheme: String, host: String, port: Int): Uri
  11. def apply(scheme: String, host: String): Uri
  12. def apply(scheme: String, path: Seq[String]): Uri
  13. def apply(host: String, port: Int, path: Seq[String]): Uri
  14. def apply(host: String, port: Int): Uri
  15. def apply(host: String): Uri
  16. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  17. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  18. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  20. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  26. def parse(uri: String): Either[String, Uri]
  27. def pathRelative(path: Seq[String], querySegments: Seq[QuerySegment], fragment: Option[String]): Uri

    Create a relative URI with a relative path.

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

    Create a relative URI with a relative path.

  29. def pathRelative(path: Seq[String]): Uri

    Create a relative URI with a relative path.

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

    Create a relative URI with an absolute path.

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

    Create a relative URI with an absolute path.

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

    Create a relative URI with an absolute path.

  33. def safeApply(scheme: String, authority: Option[Authority], pathSegments: Seq[Segment], querySegments: Seq[QuerySegment], fragmentSegment: Option[Segment]): Either[String, Uri]
  34. def safeApply(scheme: String, userInfo: Option[UserInfo], host: String, port: Option[Int], path: Seq[String], querySegments: Seq[QuerySegment], fragment: Option[String]): Either[String, Uri]
  35. def safeApply(scheme: String, host: String, path: Seq[String], fragment: Option[String]): Either[String, Uri]
  36. def safeApply(scheme: String, host: String, path: Seq[String]): Either[String, Uri]
  37. def safeApply(scheme: String, host: String, port: Int, path: Seq[String]): Either[String, Uri]
  38. def safeApply(scheme: String, host: String, port: Int): Either[String, Uri]
  39. def safeApply(scheme: String, host: String): Either[String, Uri]
  40. def safeApply(scheme: String, path: Seq[String]): Either[String, Uri]
  41. def safeApply(host: String, port: Int, path: Seq[String]): Either[String, Uri]
  42. def safeApply(host: String, port: Int): Either[String, Uri]
  43. def safeApply(host: String): Either[String, Uri]
  44. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  45. def toString(): String
    Definition Classes
    AnyRef → Any
  46. def unsafeApply(scheme: String, authority: Option[Authority], pathSegments: Seq[Segment], querySegments: Seq[QuerySegment], fragmentSegment: Option[Segment]): Uri
  47. def unsafeApply(scheme: String, userInfo: Option[UserInfo], host: String, port: Option[Int], path: Seq[String], querySegments: Seq[QuerySegment], fragment: Option[String]): Uri
  48. def unsafeApply(scheme: String, host: String, path: Seq[String], fragment: Option[String]): Uri
  49. def unsafeApply(scheme: String, host: String, path: Seq[String]): Uri
  50. def unsafeApply(scheme: String, host: String, port: Int, path: Seq[String]): Uri
  51. def unsafeApply(scheme: String, host: String, port: Int): Uri
  52. def unsafeApply(scheme: String, host: String): Uri
  53. def unsafeApply(scheme: String, path: Seq[String]): Uri
  54. def unsafeApply(host: String, port: Int, path: Seq[String]): Uri
  55. def unsafeApply(host: String, port: Int): Uri
  56. def unsafeApply(host: String): Uri
  57. def unsafeParse(uri: String): Uri
  58. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  59. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  60. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  61. object Authority extends Serializable
  62. object EmptyPath extends PathSegments with Product with Serializable
  63. object FragmentEncoding
  64. object FragmentSegment
  65. object HostEncoding
  66. object HostSegment
  67. object PathSegment
  68. object PathSegmentEncoding
  69. object PathSegments
  70. object QuerySegment
  71. object QuerySegmentEncoding

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Serializable

Inherited from UriInterpolator

Inherited from AnyRef

Inherited from Any

Ungrouped