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
  • Accepts
  • CacheDirective
  • Cookie
  • CookieValueWithMeta
  • CookieWithMeta
  • ETag
  • package internal
    Definition Classes
    model
  • package sse
    Definition Classes
    model
p

sttp.model

headers

package headers

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait CacheDirective extends AnyRef
  2. case class Cookie(name: String, value: String) extends Product with Serializable

    A cookie name-value pair.

    A cookie name-value pair.

    The name and value should be already encoded (if necessary), as when serialised, they end up unmodified in the header.

  3. case class CookieValueWithMeta(value: String, expires: Option[Instant], maxAge: Option[Long], domain: Option[String], path: Option[String], secure: Boolean, httpOnly: Boolean, sameSite: Option[SameSite], otherDirectives: Map[String, Option[String]]) extends Product with Serializable
  4. case class CookieWithMeta(name: String, valueWithMeta: CookieValueWithMeta) extends Product with Serializable

    A cookie name-value pair with directives.

    A cookie name-value pair with directives.

    All String values should be already encoded (if necessary), as when serialised, they end up unmodified in the header.

  5. case class ETag(tag: String, weak: Boolean = false) extends Product with Serializable

Value Members

  1. object Accepts
  2. object CacheDirective
  3. object Cookie extends Serializable

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

  4. object CookieValueWithMeta extends Serializable
  5. object CookieWithMeta extends Serializable
  6. object ETag extends Serializable

Ungrouped