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

    Exceptions thrown

    IllegalArgumentException If the header name contains illegal characters.

  57. def unsafeParseHttpDate(s: String): Instant
  58. def userAgent(userAgent: String): Header
  59. def vary(headerNames: String*): Header
  60. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  61. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  62. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  63. def wwwAuthenticate(firstChallenge: WWWAuthenticateChallenge, otherChallenges: WWWAuthenticateChallenge*): List[Header]
  64. def wwwAuthenticate(challenge: WWWAuthenticateChallenge): Header
  65. 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