object HeaderDirectives extends HeaderDirectives

Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. HeaderDirectives
  2. HeaderDirectives
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def checkSameOrigin(allowed: Default): Directive0

    Checks that request comes from the same origin.

    Checks that request comes from the same origin. Extracts the Origin header value and verifies that allowed range contains the obtained value. In the case of absent of the Origin header rejects with MissingHeaderRejection. If the origin value is not in the allowed range rejects with an InvalidOriginRejection and StatusCodes.Forbidden status.

    Definition Classes
    HeaderDirectives
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def headerValue[T](f: (HttpHeader) => Option[T]): Directive1[T]

    Extracts an HTTP header value using the given function.

    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 akka.http.scaladsl.server.MalformedHeaderRejection.

    Definition Classes
    HeaderDirectives
  13. def headerValueByName(headerName: String): Directive1[String]

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

    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 akka.http.scaladsl.server.MissingHeaderRejection.

    Definition Classes
    HeaderDirectives
  14. def headerValueByType[T](magnet: HeaderMagnet[T]): Directive1[T]

    Extracts the first HTTP request header of the given type.

    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 akka.http.scaladsl.server.MissingHeaderRejection.

    Custom headers will only be matched by this directive if they extend ModeledCustomHeader and provide a companion extending ModeledCustomHeaderCompanion.

    Definition Classes
    HeaderDirectives
  15. def headerValuePF[T](pf: PartialFunction[HttpHeader, T]): Directive1[T]

    Extracts an HTTP header value using the given partial function.

    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.

    Definition Classes
    HeaderDirectives
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. def optionalHeaderValue[T](f: (HttpHeader) => Option[T]): Directive1[Option[T]]

    Extracts an optional HTTP header value using the given function.

    Extracts an optional HTTP header value using the given function. If the given function throws an exception the request is rejected with a akka.http.scaladsl.server.MalformedHeaderRejection.

    Definition Classes
    HeaderDirectives
  21. 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.

    Definition Classes
    HeaderDirectives
  22. def optionalHeaderValueByType[T <: HttpHeader](magnet: HeaderMagnet[T]): Directive1[Option[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 they extend ModeledCustomHeader and provide a companion extending ModeledCustomHeaderCompanion.

    Definition Classes
    HeaderDirectives
  23. def optionalHeaderValuePF[T](pf: PartialFunction[HttpHeader, T]): Directive1[Option[T]]

    Extracts an optional HTTP header value using the given partial function.

    Extracts an optional HTTP header value using the given partial function. If the given function throws an exception the request is rejected with a akka.http.scaladsl.server.MalformedHeaderRejection.

    Definition Classes
    HeaderDirectives
  24. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Deprecated Value Members

  1. def headerValueByName(headerName: Symbol): Directive1[String]

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

    Extracts the value of the first HTTP request header with the given name. If no header with a matching name is found the request is rejected with a akka.http.scaladsl.server.MissingHeaderRejection.

    Definition Classes
    HeaderDirectives
    Annotations
    @deprecated
    Deprecated

    (Since version 10.2.0) Use string argument version or headerValueByType, e.g. instead of headerValueByName('Referer) use headerValueByType(Referer)

  2. def optionalHeaderValueByName(headerName: Symbol): 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.

    Definition Classes
    HeaderDirectives
    Annotations
    @deprecated
    Deprecated

    (Since version 10.2.0) Use string argument version or headerValueByType, e.g. instead of optionalHeaderValueByName('Referer) use optionalHeaderValueByType(Referer)

Inherited from HeaderDirectives

Inherited from AnyRef

Inherited from Any

Header directives

Ungrouped