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
  • 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
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Uri
  2. Serializable
  3. UriInterpolator
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. case class Authority(userInfo: Option[UserInfo], hostSegment: Segment, port: Option[Int]) extends Product with Serializable
  2. type Encoding = (String) => String
  3. sealed trait QuerySegment extends AnyRef
  4. case class Segment(v: String, encoding: Encoding) extends Product with Serializable
  5. case class UserInfo(username: String, password: Option[String]) extends Product with Serializable
  6. 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(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  18. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  20. final def getClass(): Class[_ <: AnyRef]
    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 relative(path: Seq[String], querySegments: Seq[QuerySegment], fragment: Option[String]): Uri
  28. def relative(path: Seq[String], fragment: Option[String]): Uri
  29. def relative(path: Seq[String]): Uri
  30. def safeApply(scheme: String, authority: Option[Authority], pathSegments: Seq[Segment], querySegments: Seq[QuerySegment], fragmentSegment: Option[Segment]): Either[String, Uri]
  31. def safeApply(scheme: String, userInfo: Option[UserInfo], host: String, port: Option[Int], path: Seq[String], querySegments: Seq[QuerySegment], fragment: Option[String]): Either[String, Uri]
  32. def safeApply(scheme: String, host: String, path: Seq[String], fragment: Option[String]): Either[String, Uri]
  33. def safeApply(scheme: String, host: String, path: Seq[String]): Either[String, Uri]
  34. def safeApply(scheme: String, host: String, port: Int, path: Seq[String]): Either[String, Uri]
  35. def safeApply(scheme: String, host: String, port: Int): Either[String, Uri]
  36. def safeApply(scheme: String, host: String): Either[String, Uri]
  37. def safeApply(scheme: String, path: Seq[String]): Either[String, Uri]
  38. def safeApply(host: String, port: Int, path: Seq[String]): Either[String, Uri]
  39. def safeApply(host: String, port: Int): Either[String, Uri]
  40. def safeApply(host: String): Either[String, Uri]
  41. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  42. def toString(): String
    Definition Classes
    AnyRef → Any
  43. def unsafeApply(scheme: String, authority: Option[Authority], pathSegments: Seq[Segment], querySegments: Seq[QuerySegment], fragmentSegment: Option[Segment]): Uri
  44. def unsafeApply(scheme: String, userInfo: Option[UserInfo], host: String, port: Option[Int], path: Seq[String], querySegments: Seq[QuerySegment], fragment: Option[String]): Uri
  45. def unsafeApply(scheme: String, host: String, path: Seq[String], fragment: Option[String]): Uri
  46. def unsafeApply(scheme: String, host: String, path: Seq[String]): Uri
  47. def unsafeApply(scheme: String, host: String, port: Int, path: Seq[String]): Uri
  48. def unsafeApply(scheme: String, host: String, port: Int): Uri
  49. def unsafeApply(scheme: String, host: String): Uri
  50. def unsafeApply(scheme: String, path: Seq[String]): Uri
  51. def unsafeApply(host: String, port: Int, path: Seq[String]): Uri
  52. def unsafeApply(host: String, port: Int): Uri
  53. def unsafeApply(host: String): Uri
  54. def unsafeParse(uri: String): Uri
  55. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  56. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  57. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  58. object Authority extends Serializable
  59. object FragmentEncoding
  60. object FragmentSegment
  61. object HostEncoding
  62. object HostSegment
  63. object PathSegment
  64. object PathSegmentEncoding
  65. object QuerySegment
  66. 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 UriInterpolator

Inherited from AnyRef

Inherited from Any

Ungrouped