extractRequestContext

extractRequestContext

Description

Extracts the request's underlying RequestContext.

This directive is used as a building block for most of the other directives, which extract the context and by inspecting some of it's values can decide what to do with the request - for example provide a value, or reject the request.

See also extractRequest if only interested in the HttpRequest instance itself.

Example

TODO: Example snippets for JavaDSL are subject to community contributions! Help us complete the docs, read more about it here: write example snippets for Akka HTTP Java DSL #20466.

Contents