Headers

final class Headers(val headers: List[Raw]) extends AnyVal

A collection of HTTP Headers

A collection of HTTP Headers

Companion
object
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def ++(those: Headers): Headers
def add[H](h: H)(`evidence$1`: Header[H, Recurring]): Headers
def foreach(f: Raw => Unit): Unit
def get[A](ev: Select[A]): Option[F[A]]

TODO revise scaladoc Attempt to get a org.http4s.Header of type key.HeaderT from this collection

TODO revise scaladoc Attempt to get a org.http4s.Header of type key.HeaderT from this collection

Value Params
key

HeaderKey.Extractable that can identify the required header

Returns

a scala.Option possibly containing the resulting header of type key.HeaderT

See also

Header object and get(org.typelevel.ci.CIString)

def get(key: CIString): Option[NonEmptyList[Raw]]

TODO revise scaladoc Attempt to get a org.http4s.Header from this collection of headers

TODO revise scaladoc Attempt to get a org.http4s.Header from this collection of headers

Value Params
key

name of the header to find

Returns

a scala.Option possibly containing the resulting org.http4s.Header

def getWithWarnings[A](ev: Select[A]): Option[Ior[NonEmptyList[ParseFailure], F[A]]]

TODO revise scaladoc Attempt to get a org.http4s.Header of type key.HeaderT from this collection

TODO revise scaladoc Attempt to get a org.http4s.Header of type key.HeaderT from this collection

Value Params
key

HeaderKey.Extractable that can identify the required header

Returns

a scala.Option possibly containing the resulting header of type key.HeaderT and/or any parse errors.

See also

Header object and get(org.typelevel.ci.CIString)

def put(in: ToRaw*): Headers

Make a new collection adding the specified headers, replacing existing Single headers.

Make a new collection adding the specified headers, replacing existing Single headers.

Value Params
in

multiple heteregenous headers Header to append to the new collection, see Header.ToRaw

Returns

a new Headers containing the sum of the initial and input headers

def redactSensitive(redactWhen: CIString => Boolean): Headers

Removes the Content-Length, Content-Range, Trailer, and Transfer-Encoding headers.

Removes the Content-Length, Content-Range, Trailer, and Transfer-Encoding headers.

https://tools.ietf.org/html/rfc7231#section-3.3

override def toString: String
Definition Classes
Any
def transform(f: List[Raw] => List[Raw]): Headers

Concrete fields

val headers: List[Raw]