Headers

zio.http.Headers
See theHeaders companion object
sealed trait Headers extends Iterable[Header]

Represents an immutable collection of headers. It extends HeaderExtensions and has a ton of powerful operators that can be used to add, remove and modify headers.

NOTE: Generic operators that are not specific to Headers should not be defined here. A better place would be one of the traits extended by HeaderExtension.

Attributes

Companion
object
Graph
Supertypes
trait Iterable[Header]
trait IterableFactoryDefaults[Header, Iterable]
trait IterableOps[Header, Iterable, Iterable[Header]]
trait IterableOnceOps[Header, Iterable, Iterable[Header]]
trait IterableOnce[Header]
class Object
trait Matchable
class Any
Show all
Self type

Members list

Value members

Abstract methods

def contains(key: CharSequence): Boolean
override def iterator: Iterator[Header]

Attributes

Definition Classes
IterableOnce

Concrete methods

final def ++(other: Headers): Headers
final def combine(other: Headers): Headers
final def combineIf(cond: Boolean)(other: Headers): Headers
final def get(key: CharSequence): Option[String]
final def get(headerType: HeaderType): Option[HeaderValue]
final def getAll(headerType: HeaderType): Chunk[HeaderValue]
final override def headers: Headers

Returns the headers

Returns the headers

Attributes

Definition Classes
final def modify(f: Header => Header): Headers
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Iterable -> Any
final override def updateHeaders(update: Headers => Headers)(implicit trace: Trace): Headers

Updates the current Headers with new one, using the provided update function passed.

Updates the current Headers with new one, using the provided update function passed.

Attributes

Definition Classes
final def when(cond: Boolean): Headers

Inherited methods

final def ++[B >: Header](suffix: IterableOnce[B]): CC[B]

Attributes

Inherited from:
IterableOps
final def addHeader(name: CharSequence, value: CharSequence): A

Attributes

Inherited from:
HeaderModifier
final def addHeader(header: Header): A

Attributes

Inherited from:
HeaderModifier
final def addHeaders(headers: Headers): A

Attributes

Inherited from:
HeaderModifier
final def addString(b: StringBuilder): StringBuilder

Attributes

Inherited from:
IterableOnceOps
final def addString(b: StringBuilder, sep: String): StringBuilder

Attributes

Inherited from:
IterableOnceOps
def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder

Attributes

Inherited from:
IterableOnceOps
def collect[B](pf: PartialFunction[Header, B]): CC[B]

Attributes

Inherited from:
IterableOps
def collectFirst[B](pf: PartialFunction[Header, B]): Option[B]

Attributes

Inherited from:
IterableOnceOps
def concat[B >: Header](suffix: IterableOnce[B]): CC[B]

Attributes

Inherited from:
IterableOps
def copyToArray[B >: Header](xs: Array[B], start: Int, len: Int): Int

Attributes

Inherited from:
IterableOnceOps
def copyToArray[B >: Header](xs: Array[B], start: Int): Int

Attributes

Inherited from:
IterableOnceOps
def copyToArray[B >: Header](xs: Array[B]): Int

Attributes

Inherited from:
IterableOnceOps
def corresponds[B](that: IterableOnce[B])(p: (Header, B) => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
def count(p: Header => Boolean): Int

Attributes

Inherited from:
IterableOnceOps
def drop(n: Int): C

Attributes

Inherited from:
IterableOps
def dropRight(n: Int): C

Attributes

Inherited from:
IterableOps
def dropWhile(p: Header => Boolean): C

Attributes

Inherited from:
IterableOps
override def empty: CC[A]

Attributes

Definition Classes
IterableFactoryDefaults -> IterableOps
Inherited from:
IterableFactoryDefaults
def exists(p: Header => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
def filter(pred: Header => Boolean): C

Attributes

Inherited from:
IterableOps
def filterNot(pred: Header => Boolean): C

Attributes

Inherited from:
IterableOps
def find(p: Header => Boolean): Option[A]

Attributes

Inherited from:
IterableOnceOps
def flatMap[B](f: Header => IterableOnce[B]): CC[B]

Attributes

Inherited from:
IterableOps
def flatten[B](implicit asIterable: Header => IterableOnce[B]): CC[B]

Attributes

Inherited from:
IterableOps
def fold[A1 >: Header](z: A1)(op: (A1, A1) => A1): A1

Attributes

Inherited from:
IterableOnceOps
def foldLeft[B](z: B)(op: (B, Header) => B): B

Attributes

Inherited from:
IterableOnceOps
def foldRight[B](z: B)(op: (Header, B) => B): B

Attributes

Inherited from:
IterableOnceOps
def forall(p: Header => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
def foreach[U](f: Header => U): Unit

Attributes

Inherited from:
IterableOnceOps
protected def fromSpecific(coll: IterableOnce[Header]): CC[A]

Attributes

Inherited from:
IterableFactoryDefaults
def groupBy[K](f: Header => K): Map[K, C]

Attributes

Inherited from:
IterableOps
def groupMap[K, B](key: Header => K)(f: Header => B): Map[K, CC[B]]

Attributes

Inherited from:
IterableOps
def groupMapReduce[K, B](key: Header => K)(f: Header => B)(reduce: (B, B) => B): Map[K, B]

Attributes

Inherited from:
IterableOps
def grouped(size: Int): Iterator[C]

Attributes

Inherited from:
IterableOps
final def hasContentType(value: CharSequence): Boolean

Attributes

Inherited from:
HeaderChecks
final def hasFormMultipartContentType: Boolean

Attributes

Inherited from:
HeaderChecks
final def hasFormUrlencodedContentType: Boolean

Attributes

Inherited from:
HeaderChecks
final def hasHeader(header: Header): Boolean

Attributes

Inherited from:
HeaderChecks
final def hasHeader(headerType: HeaderType): Boolean

Attributes

Inherited from:
HeaderChecks
final def hasHeader(name: CharSequence): Boolean

Attributes

Inherited from:
HeaderChecks
final def hasJsonContentType: Boolean

Attributes

Inherited from:
HeaderChecks
final def hasMediaType(mediaType: MediaType): Boolean

Attributes

Inherited from:
HeaderChecks
final def hasTextPlainContentType: Boolean

Attributes

Inherited from:
HeaderChecks
final def hasXhtmlXmlContentType: Boolean

Attributes

Inherited from:
HeaderChecks
final def hasXmlContentType: Boolean

Attributes

Inherited from:
HeaderChecks
def head: A

Attributes

Inherited from:
IterableOps
def headOption: Option[A]

Attributes

Inherited from:
IterableOps
final def header(headerType: HeaderType): Option[HeaderValue]

Gets a header or returns None if the header was not present or it could not be parsed

Gets a header or returns None if the header was not present or it could not be parsed

Attributes

Inherited from:
HeaderGetters
final def headerOrFail(headerType: HeaderType): Option[Either[String, HeaderValue]]

Gets a header. If the header is not present, returns None. If the header could not be parsed it returns the parsing error

Gets a header. If the header is not present, returns None. If the header could not be parsed it returns the parsing error

Attributes

Inherited from:
HeaderGetters
final def headers(headerType: HeaderType): Chunk[HeaderValue]

Attributes

Inherited from:
HeaderGetters
def init: C

Attributes

Inherited from:
IterableOps
def inits: Iterator[C]

Attributes

Inherited from:
IterableOps
def isEmpty: Boolean

Attributes

Inherited from:
IterableOnceOps
override def isTraversableAgain: Boolean

Attributes

Definition Classes
IterableOps -> IterableOnceOps
Inherited from:
IterableOps
def iterableFactory: IterableFactory[Iterable]

Attributes

Inherited from:
Iterable
def knownSize: Int

Attributes

Inherited from:
IterableOnce
def last: A

Attributes

Inherited from:
IterableOps
def lastOption: Option[A]

Attributes

Inherited from:
IterableOps
def lazyZip[B](that: Iterable[B]): LazyZip2[A, B, Iterable]

Attributes

Inherited from:
Iterable
def map[B](f: Header => B): CC[B]

Attributes

Inherited from:
IterableOps
def max[B >: Header](implicit ord: Ordering[B]): A

Attributes

Inherited from:
IterableOnceOps
def maxBy[B](f: Header => B)(implicit cmp: Ordering[B]): A

Attributes

Inherited from:
IterableOnceOps
def maxByOption[B](f: Header => B)(implicit cmp: Ordering[B]): Option[A]

Attributes

Inherited from:
IterableOnceOps
def maxOption[B >: Header](implicit ord: Ordering[B]): Option[A]

Attributes

Inherited from:
IterableOnceOps
def min[B >: Header](implicit ord: Ordering[B]): A

Attributes

Inherited from:
IterableOnceOps
def minBy[B](f: Header => B)(implicit cmp: Ordering[B]): A

Attributes

Inherited from:
IterableOnceOps
def minByOption[B](f: Header => B)(implicit cmp: Ordering[B]): Option[A]

Attributes

Inherited from:
IterableOnceOps
def minOption[B >: Header](implicit ord: Ordering[B]): Option[A]

Attributes

Inherited from:
IterableOnceOps
final def mkString: String

Attributes

Inherited from:
IterableOnceOps
final def mkString(sep: String): String

Attributes

Inherited from:
IterableOnceOps
final def mkString(start: String, sep: String, end: String): String

Attributes

Inherited from:
IterableOnceOps
protected def newSpecificBuilder: Builder[A, CC[A]]

Attributes

Inherited from:
IterableFactoryDefaults
def nonEmpty: Boolean

Attributes

Inherited from:
IterableOnceOps
def partition(p: Header => Boolean): (C, C)

Attributes

Inherited from:
IterableOps
def partitionMap[A1, A2](f: Header => Either[A1, A2]): (CC[A1], CC[A2])

Attributes

Inherited from:
IterableOps
def product[B >: Header](implicit num: Numeric[B]): B

Attributes

Inherited from:
IterableOnceOps
final def rawHeader(headerType: HeaderType): Option[String]

Gets the raw unparsed header value

Gets the raw unparsed header value

Attributes

Inherited from:
HeaderGetters
final def rawHeader(name: CharSequence): Option[String]

Gets the raw unparsed header value

Gets the raw unparsed header value

Attributes

Inherited from:
HeaderGetters
def reduce[B >: Header](op: (B, B) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceLeft[B >: Header](op: (B, Header) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceLeftOption[B >: Header](op: (B, Header) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def reduceOption[B >: Header](op: (B, B) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def reduceRight[B >: Header](op: (Header, B) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceRightOption[B >: Header](op: (Header, B) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
final def removeHeader(name: String): A

Attributes

Inherited from:
HeaderModifier
final def removeHeader(headerType: HeaderType): A

Attributes

Inherited from:
HeaderModifier
final def removeHeaders(headers: Set[String]): A

Attributes

Inherited from:
HeaderModifier
protected def reversed: Iterable[A]

Attributes

Inherited from:
IterableOnceOps
def scan[B >: Header](z: B)(op: (B, B) => B): CC[B]

Attributes

Inherited from:
IterableOps
def scanLeft[B](z: B)(op: (B, Header) => B): CC[B]

Attributes

Inherited from:
IterableOps
def scanRight[B](z: B)(op: (Header, B) => B): CC[B]

Attributes

Inherited from:
IterableOps
final def setHeaders(headers: Headers): A

Attributes

Inherited from:
HeaderModifier
def size: Int

Attributes

Inherited from:
IterableOnceOps
def sizeCompare(that: Iterable[_]): Int

Attributes

Inherited from:
IterableOps
def sizeCompare(otherSize: Int): Int

Attributes

Inherited from:
IterableOps
final def sizeIs: SizeCompareOps

Attributes

Inherited from:
IterableOps
def slice(from: Int, until: Int): C

Attributes

Inherited from:
IterableOps
def sliding(size: Int, step: Int): Iterator[C]

Attributes

Inherited from:
IterableOps
def sliding(size: Int): Iterator[C]

Attributes

Inherited from:
IterableOps
def span(p: Header => Boolean): (C, C)

Attributes

Inherited from:
IterableOps
override def splitAt(n: Int): (C, C)

Attributes

Definition Classes
IterableOps -> IterableOnceOps
Inherited from:
IterableOps
def stepper[S <: Stepper[_]](implicit shape: StepperShape[Header, S]): S

Attributes

Inherited from:
IterableOnce
def sum[B >: Header](implicit num: Numeric[B]): B

Attributes

Inherited from:
IterableOnceOps
def tail: C

Attributes

Inherited from:
IterableOps
def tails: Iterator[C]

Attributes

Inherited from:
IterableOps
def take(n: Int): C

Attributes

Inherited from:
IterableOps
def takeRight(n: Int): C

Attributes

Inherited from:
IterableOps
def takeWhile(p: Header => Boolean): C

Attributes

Inherited from:
IterableOps
override def tapEach[U](f: Header => U): C

Attributes

Definition Classes
IterableOps -> IterableOnceOps
Inherited from:
IterableOps
def to[C1](factory: Factory[Header, C1]): C1

Attributes

Inherited from:
IterableOnceOps
def toArray[B >: Header : ClassTag]: Array[B]

Attributes

Inherited from:
IterableOnceOps
final def toBuffer[B >: Header]: Buffer[B]

Attributes

Inherited from:
IterableOnceOps
def toIndexedSeq: IndexedSeq[A]

Attributes

Inherited from:
IterableOnceOps
def toList: List[A]

Attributes

Inherited from:
IterableOnceOps
def toMap[K, V](implicit ev: Header <:< (K, V)): Map[K, V]

Attributes

Inherited from:
IterableOnceOps
def toSeq: Seq[A]

Attributes

Inherited from:
IterableOnceOps
def toSet[B >: Header]: Set[B]

Attributes

Inherited from:
IterableOnceOps
def toVector: Vector[A]

Attributes

Inherited from:
IterableOnceOps
def transpose[B](implicit asIterable: Header => Iterable[B]): CC[CC[B]]

Attributes

Inherited from:
IterableOps
def unzip[A1, A2](implicit asPair: Header => (A1, A2)): (CC[A1], CC[A2])

Attributes

Inherited from:
IterableOps
def unzip3[A1, A2, A3](implicit asTriple: Header => (A1, A2, A3)): (CC[A1], CC[A2], CC[A3])

Attributes

Inherited from:
IterableOps
def view: View[A]

Attributes

Inherited from:
IterableOps
def withFilter(p: Header => Boolean): WithFilter[A, CC]

Attributes

Inherited from:
IterableOps
def zip[B](that: IterableOnce[B]): CC[(A, B)]

Attributes

Inherited from:
IterableOps
def zipAll[A1 >: Header, B](that: Iterable[B], thisElem: A1, thatElem: B): CC[(A1, B)]

Attributes

Inherited from:
IterableOps
def zipWithIndex: CC[(A, Int)]

Attributes

Inherited from:
IterableOps

Deprecated and Inherited methods

def ++:[B >: Header](that: IterableOnce[B]): CC[B]

Attributes

Deprecated
[Since version 2.13.0] Use ++ instead of ++: for collections of type Iterable
Inherited from:
IterableOps
final def /:[B](z: B)(op: (B, Header) => B): B

Attributes

Deprecated
[Since version 2.13.0] Use foldLeft instead of /:
Inherited from:
IterableOnceOps
final def :\[B](z: B)(op: (Header, B) => B): B

Attributes

Deprecated
[Since version 2.13.0] Use foldRight instead of :\\
Inherited from:
IterableOnceOps
def aggregate[B](z: => B)(seqop: (B, Header) => B, combop: (B, B) => B): B

Attributes

Deprecated
[Since version 2.13.0] `aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead.
Inherited from:
IterableOnceOps
def companion: IterableFactory[CC]

Attributes

Deprecated
[Since version 2.13.0] Use iterableFactory instead
Inherited from:
IterableOps
final def copyToBuffer[B >: Header](dest: Buffer[B]): Unit

Attributes

Deprecated
[Since version 2.13.0] Use `dest ++= coll` instead
Inherited from:
IterableOnceOps
def hasDefiniteSize: Boolean

Attributes

Deprecated
[Since version 2.13.0] Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)
Inherited from:
IterableOnceOps
final def repr: C

Attributes

Deprecated
[Since version 2.13.0] Use coll instead of repr in a collection implementation, use the collection value itself from the outside
Inherited from:
IterableOps
def seq: Iterable.this.type

Attributes

Deprecated
[Since version 2.13.0] Iterable.seq always returns the iterable itself
Inherited from:
Iterable
final def toIterable: Iterable.this.type

Attributes

Deprecated
[Since version 2.13.7] toIterable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections
Inherited from:
Iterable
final def toIterator: Iterator[A]

Attributes

Deprecated
[Since version 2.13.0] Use .iterator instead of .toIterator
Inherited from:
IterableOnceOps
final def toStream: Stream[A]

Attributes

Deprecated
[Since version 2.13.0] Use .to(LazyList) instead of .toStream
Inherited from:
IterableOnceOps
final def toTraversable: Iterable[A]

Attributes

Deprecated
[Since version 2.13.0] toTraversable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections
Inherited from:
IterableOps
def view(from: Int, until: Int): View[A]

Attributes

Deprecated
[Since version 2.13.0] Use .view.slice(from, until) instead of .view(from, until)
Inherited from:
IterableOps