HeaderModifier

zio.http.internal.HeaderModifier
trait HeaderModifier[+A]

Maintains a list of operators that modify the current Headers. Once modified, a new instance of the same type is returned. So or eg: request.addHeader("A", "B") should return a new Request and similarly headers.add("A", "B") should return a new Headers instance.

NOTE: Add methods here that modify the current headers and returns an instance of the same type.

Attributes

Source
HeaderModifier.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class RequestHandlerSyntax[R, Err]
Self type

Members list

Value members

Abstract methods

def updateHeaders(update: Headers => Headers)(implicit trace: Trace): A

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

Source
HeaderModifier.scala

Concrete methods

final def addHeader(header: Header): A

Attributes

Source
HeaderModifier.scala
protected def addHeader(name: CharSequence, value: CharSequence): A

Attributes

Source
HeaderModifier.scala
final def addHeader[T](name: String, value: T)(implicit schema: Schema[T]): A

Adds a header / headers with the specified name and based on the given value. The value type must have a schema and can be a primitive type (e.g. Int, String, UUID, Instant etc.), a case class with a single field or a collection of either of these.

Adds a header / headers with the specified name and based on the given value. The value type must have a schema and can be a primitive type (e.g. Int, String, UUID, Instant etc.), a case class with a single field or a collection of either of these.

Attributes

Source
HeaderModifier.scala
final def addHeader[T](value: T)(implicit schema: Schema[T]): A

Adds headers based on the given value. The type of the value must have a schema and be a case class and all fields will be added as headers. So fields must be of primitive types (e.g. Int, String, UUID, Instant etc.), a case class with a single field or a collection of either of these. The header names are the field names.

Adds headers based on the given value. The type of the value must have a schema and be a case class and all fields will be added as headers. So fields must be of primitive types (e.g. Int, String, UUID, Instant etc.), a case class with a single field or a collection of either of these. The header names are the field names.

Attributes

Source
HeaderModifier.scala
final def addHeaders(headers: Headers): A

Attributes

Source
HeaderModifier.scala
final def addHeaders(headers: Iterable[(CharSequence, CharSequence)]): A

Attributes

Source
HeaderModifier.scala
final def removeHeader(headerType: HeaderType): A

Attributes

Source
HeaderModifier.scala
final def removeHeader(name: String): A

Attributes

Source
HeaderModifier.scala
final def removeHeaders(headers: Set[String]): A

Attributes

Source
HeaderModifier.scala
final def setHeaders(headers: Headers): A

Attributes

Source
HeaderModifier.scala