AttributeMap

sttp.attributes.AttributeMap
See theAttributeMap companion object
case class AttributeMap(storage: Map[String, Any])

A type-safe map from AttributeKey to values of types determined by the key.

An attribute is arbitrary data that is attached to some top-level sttp-defined objects. The data is not interpreted by the libraries in any way, and is passed as-is. However, built-in or user-provided extensions and integrations might use the attributes to provide their functionality.

Typically, you'll add attributes using an .attribute method on the sttp-defined object. Each attribute should correspond to a type. The type should be defined by the extension, which uses the attribute, and make it available for import.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def get[T](k: AttributeKey[T]): Option[T]
def isEmpty: Boolean
def nonEmpty: Boolean
def put[T](k: AttributeKey[T], v: T): AttributeMap

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product