Header

class Header(val name: String, val value: String)

An HTTP header. The name property is case-insensitive during equality checks.

To compare if two headers have the same name, use the is method, which does a case-insensitive check, instead of comparing the name property.

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

Companion:
object
class Object
trait Matchable
class Any

Value members

Concrete methods

override def equals(that: Any): Boolean
Definition Classes
Any
override def hashCode(): Int
Definition Classes
Any
def is(otherName: String): Boolean

Check if the name of this header is the same as the given one. The names are compared in a case-insensitive way.

Check if the name of this header is the same as the given one. The names are compared in a case-insensitive way.

override def toString: String
Returns:

Representation in the format: [name]: [value].

Definition Classes
Any
def toStringSafe(sensitiveHeaders: Set[String]): String
Returns:

Representation in the format: [name]: [value]. If the header is sensitive (see HeaderNames.SensitiveHeaders), the value is omitted.

Concrete fields

val name: String
val value: String