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
  • ContentRangeUnits
  • ContentTypeRange
  • HasHeaders
  • Header
  • HeaderNames
  • Headers
  • MediaType
  • MediaTypes
  • Method
  • Methods
  • Part
  • QueryParams
  • RequestMetadata
  • ResponseMetadata
  • StatusCode
  • StatusCodes
  • Uri
  • UriInterpolator

object Header

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

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Header
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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. val Rfc850WeekDays: Set[String]
  5. def accept(mediaRanges: String): Header
  6. def accept(mediaType: MediaType, additionalMediaTypes: MediaType*): Header
  7. def acceptCharset(charsetRanges: String): Header
  8. def acceptEncoding(encodingRanges: String): Header
  9. def accessControlAllowCredentials(allow: Boolean): Header
  10. def accessControlAllowHeaders(headerNames: String*): Header
  11. def accessControlAllowMethods(methods: Method*): Header
  12. def accessControlAllowOrigin(originRange: String): Header
  13. def accessControlExposeHeaders(headerNames: String*): Header
  14. def accessControlMaxAge(deltaSeconds: Long): Header
  15. def accessControlRequestHeaders(headerNames: String*): Header
  16. def accessControlRequestMethod(method: Method): Header
  17. def apply(name: String, value: String): Header
  18. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  19. def authorization(authType: String, credentials: String): Header
  20. def cacheControl(directives: Iterable[CacheDirective]): Header
  21. def cacheControl(first: CacheDirective, other: CacheDirective*): Header
  22. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  23. def contentEncoding(encoding: String): Header
  24. def contentLength(length: Long): Header
  25. def contentRange(contentRange: ContentRange): Header
  26. def contentType(mediaType: MediaType): Header
  27. def cookie(firstCookie: Cookie, otherCookies: Cookie*): Header
  28. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  30. def etag(tag: ETag): Header
  31. def etag(tag: String): Header
  32. def expires(i: Instant): Header
  33. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  34. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  35. def ifModifiedSince(i: Instant): Header
  36. def ifNoneMatch(tags: List[ETag]): Header
  37. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  38. def lastModified(i: Instant): Header
  39. def location(uri: Uri): Header
  40. def location(uri: String): Header
  41. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  42. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  43. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  44. def parseHttpDate(v: String): Either[String, Instant]
  45. def proxyAuthorization(authType: String, credentials: String): Header
  46. def range(range: Range): Header
  47. def safeApply(name: String, value: String): Either[String, Header]
  48. def setCookie(cookie: CookieWithMeta): Header
  49. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  50. def toHttpDateString(i: Instant): String
  51. def toString(): String
    Definition Classes
    AnyRef → Any
  52. def unapply(h: Header): Option[(String, String)]
  53. def unsafeApply(name: String, value: String): Header

    Exceptions thrown

    IllegalArgumentException If the header name contains illegal characters.

  54. def unsafeParseHttpDate(s: String): Instant
  55. def userAgent(userAgent: String): Header
  56. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  57. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  58. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  59. def xForwardedFor(firstAddress: String, otherAddresses: String*): Header

Deprecated Value Members

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

Inherited from AnyRef

Inherited from Any

Ungrouped