Attributes
- Companion
- trait
- Source
- HeaderDirectives.scala
- Graph
-
- Supertypes
- Self type
-
HeaderDirectives.type
Members list
Grouped members
header
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.
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.
Attributes
- Inherited from:
- HeaderDirectives
- Source
- HeaderDirectives.scala
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 pekko.http.scaladsl.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 pekko.http.scaladsl.server.MalformedHeaderRejection.
Attributes
- Inherited from:
- HeaderDirectives
- Source
- HeaderDirectives.scala
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 pekko.http.scaladsl.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 pekko.http.scaladsl.server.MissingHeaderRejection.
Attributes
- Inherited from:
- HeaderDirectives
- Source
- HeaderDirectives.scala
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 pekko.http.scaladsl.server.MissingHeaderRejection.
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 pekko.http.scaladsl.server.MissingHeaderRejection.
Attributes
- Deprecated
-
[Since version Akka HTTP 10.2.0] - Inherited from:
- HeaderDirectives
- Source
- HeaderDirectives.scala
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 pekko.http.scaladsl.server.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 pekko.http.scaladsl.server.MissingHeaderRejection.
Custom headers will only be matched by this directive if they extend ModeledCustomHeader and provide a companion extending ModeledCustomHeaderCompanion.
Attributes
- Inherited from:
- HeaderDirectives
- Source
- HeaderDirectives.scala
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
Extracts an optional HTTP header value using the given function. If the given function throws an exception the request is rejected with a pekko.http.scaladsl.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 pekko.http.scaladsl.server.MalformedHeaderRejection.
Attributes
- Inherited from:
- HeaderDirectives
- Source
- HeaderDirectives.scala
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
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
- Deprecated
-
[Since version Akka HTTP 10.2.0] - Inherited from:
- HeaderDirectives
- Source
- HeaderDirectives.scala
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.
Attributes
- Inherited from:
- HeaderDirectives
- Source
- HeaderDirectives.scala
Extracts an optional HTTP header value using the given partial function. If the given function throws an exception the request is rejected with a pekko.http.scaladsl.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 pekko.http.scaladsl.server.MalformedHeaderRejection.
Attributes
- Inherited from:
- HeaderDirectives
- Source
- HeaderDirectives.scala