RequestHandlerSyntax

zio.http.Handler.RequestHandlerSyntax
final implicit class RequestHandlerSyntax[-R, +Err](val self: RequestHandler[R, Err]) extends HeaderModifier[RequestHandler[R, Err]]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def method(method: Method): RequestHandler[R, Err]

Overwrites the method in the incoming request

Overwrites the method in the incoming request

Attributes

def patch(patch: Patch)(implicit trace: Trace): RequestHandler[R, Err]

Patches the response produced by the handler

Patches the response produced by the handler

Attributes

def path(path: Path): RequestHandler[R, Err]

Overwrites the path in the incoming request

Overwrites the path in the incoming request

Attributes

def status(status: Status)(implicit trace: Trace): RequestHandler[R, Err]

Sets the status in the response produced by the handler

Sets the status in the response produced by the handler

Attributes

def updateHeaders(update: Headers => Headers)(implicit trace: Trace): RequestHandler[R, Err]

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

def url(url: URL): RequestHandler[R, Err]

Overwrites the url in the incoming request

Overwrites the url in the incoming request

Attributes

Inherited methods

final def addHeader[T](value: T)(implicit schema: Schema[T]): RequestHandler[R, Err]

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

Inherited from:
HeaderModifier
final def addHeader[T](name: String, value: T)(implicit schema: Schema[T]): RequestHandler[R, Err]

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

Inherited from:
HeaderModifier
protected def addHeader(name: CharSequence, value: CharSequence): RequestHandler[R, Err]

Attributes

Inherited from:
HeaderModifier
final def addHeader(header: Header): RequestHandler[R, Err]

Attributes

Inherited from:
HeaderModifier
final def addHeaders(headers: Iterable[(CharSequence, CharSequence)]): RequestHandler[R, Err]

Attributes

Inherited from:
HeaderModifier
final def addHeaders(headers: Headers): RequestHandler[R, Err]

Attributes

Inherited from:
HeaderModifier
final def removeHeader(name: String): RequestHandler[R, Err]

Attributes

Inherited from:
HeaderModifier
final def removeHeader(headerType: HeaderType): RequestHandler[R, Err]

Attributes

Inherited from:
HeaderModifier
final def removeHeaders(headers: Set[String]): RequestHandler[R, Err]

Attributes

Inherited from:
HeaderModifier
final def setHeaders(headers: Headers): RequestHandler[R, Err]

Attributes

Inherited from:
HeaderModifier

Concrete fields

val self: RequestHandler[R, Err]