HeaderDirectives

pl.iterators.stir.server.directives.HeaderDirectives$
See theHeaderDirectives companion trait

Attributes

Companion
trait
Source
HeaderDirectives.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Inherited methods

def headerValue[T](f: Raw => Option[T]): Directive1[T]

Extracts an HTTP header value using the given function. If the function result is undefined for all headers the request is rejected with an empty rejection set. If the given function throws an exception the request is rejected with a pl.iterators.stir.server.MalformedHeaderRejection.

Extracts an HTTP header value using the given function. If the function result is undefined for all headers the request is rejected with an empty rejection set. If the given function throws an exception the request is rejected with a pl.iterators.stir.server.MalformedHeaderRejection.

Attributes

Inherited from:
HeaderDirectives
Source
HeaderDirectives.scala
def headerValueByName(headerName: String): Directive1[String]

Extracts the value of the HTTP request header with the given name. If no header with a matching name is found the request is rejected with a pl.iterators.stir.server.MissingHeaderRejection.

Extracts the value of the HTTP request header with the given name. If no header with a matching name is found the request is rejected with a pl.iterators.stir.server.MissingHeaderRejection.

Attributes

Inherited from:
HeaderDirectives
Source
HeaderDirectives.scala
def headerValueByType[T](implicit ev: Select[T], cls: ClassTag[T]): Directive1[F[T]]

Extracts the first HTTP request header of the given type. If no header with a matching type is found the request is rejected with a MissingHeaderRejection.

Extracts the first HTTP request header of the given type. If no header with a matching type is found the request is rejected with a MissingHeaderRejection.

Custom headers will only be matched by this directive if ev Header.Select[T] is provided.

Attributes

Inherited from:
HeaderDirectives
Source
HeaderDirectives.scala
def headerValuePF[T](pf: PartialFunction[Raw, T]): Directive1[T]

Extracts an HTTP header value using the given partial function. If the function is undefined for all headers the request is rejected with an empty rejection set.

Extracts an HTTP header value using the given partial function. If the function is undefined for all headers the request is rejected with an empty rejection set.

Attributes

Inherited from:
HeaderDirectives
Source
HeaderDirectives.scala
def optionalHeaderValue[T](f: Raw => Option[T]): Directive1[Option[T]]

Extracts an optional HTTP header value using the given function. If the given function throws an exception the request is rejected with a pl.iterators.stir.server.MalformedHeaderRejection.

Extracts an optional HTTP header value using the given function. If the given function throws an exception the request is rejected with a pl.iterators.stir.server.MalformedHeaderRejection.

Attributes

Inherited from:
HeaderDirectives
Source
HeaderDirectives.scala
def optionalHeaderValueByName(headerName: String): Directive1[Option[String]]

Extracts the value of the optional HTTP request header with the given name.

Extracts the value of the optional HTTP request header with the given name.

Attributes

Inherited from:
HeaderDirectives
Source
HeaderDirectives.scala
def optionalHeaderValueByType[T](implicit ev: Select[T]): Directive1[Option[F[T]]]

Extract the header value of the optional HTTP request header with the given type.

Extract the header value of the optional HTTP request header with the given type.

Custom headers will only be matched by this directive if ev Header.Select[T] is provided.

Attributes

Inherited from:
HeaderDirectives
Source
HeaderDirectives.scala
def optionalHeaderValuePF[T](pf: PartialFunction[Raw, T]): Directive1[Option[T]]

Extracts an optional HTTP header value using the given partial function. If the given function throws an exception the request is rejected with a pl.iterators.stir.server.MalformedHeaderRejection.

Extracts an optional HTTP header value using the given partial function. If the given function throws an exception the request is rejected with a pl.iterators.stir.server.MalformedHeaderRejection.

Attributes

Inherited from:
HeaderDirectives
Source
HeaderDirectives.scala