public interface BasicDirectives
| Modifier and Type | Method and Description | 
|---|---|
| Directive<scala.runtime.BoxedUnit> | cancelRejection(Rejection rejection)Adds a TransformationRejection cancelling all rejections equal to the given one
 to the list of rejections potentially coming back from the inner route. | 
| Directive<scala.runtime.BoxedUnit> | cancelRejections(scala.Function1<Rejection,java.lang.Object> cancelFilter)Adds a TransformationRejection cancelling all rejections for which the given filter function returns true
 to the list of rejections potentially coming back from the inner route. | 
| Directive<scala.runtime.BoxedUnit> | cancelRejections(scala.collection.immutable.Seq<java.lang.Class<?>> classes)Adds a TransformationRejection cancelling all rejections of one of the given classes
 to the list of rejections potentially coming back from the inner route. | 
| <T> Directive<scala.Tuple1<T>> | extract(scala.Function1<RequestContext,T> f)Extracts a single value using the given function. | 
| Directive<scala.Tuple1<org.apache.pekko.actor.ActorSystem>> | extractActorSystem()Extracts the  pekko.actor.ActorSystemif the available Materializer is anpekko.stream.ActorMaterializer. | 
| Directive<scala.Tuple1<org.apache.pekko.stream.scaladsl.Source<org.apache.pekko.util.ByteString,java.lang.Object>>> | extractDataBytes()Extracts the entities  dataBytespekko.stream.scaladsl.Sourcefrom thepekko.http.scaladsl.server.RequestContext. | 
| Directive<scala.Tuple1<scala.concurrent.ExecutionContextExecutor>> | extractExecutionContext()Extracts the  ExecutionContextExecutorfrom thepekko.http.scaladsl.server.RequestContext. | 
| Directive<scala.Tuple1<org.apache.pekko.event.LoggingAdapter>> | extractLog()Extracts the  pekko.event.LoggingAdapterfrom thepekko.http.scaladsl.server.RequestContext. | 
| Directive<scala.Tuple1<Uri.Path>> | extractMatchedPath()Extracts the already matched path from the RequestContext. | 
| Directive<scala.Tuple1<org.apache.pekko.stream.Materializer>> | extractMaterializer()Extracts the  pekko.stream.Materializerfrom thepekko.http.scaladsl.server.RequestContext. | 
| Directive<scala.Tuple1<ParserSettings>> | extractParserSettings()Extracts the  pekko.http.scaladsl.settings.ParserSettingsfrom thepekko.http.scaladsl.server.RequestContext. | 
| Directive<scala.Tuple1<HttpRequest>> | extractRequest()Extracts the current  HttpRequestinstance. | 
| Directive<scala.Tuple1<RequestContext>> | extractRequestContext()Extracts the  pekko.http.scaladsl.server.RequestContextitself. | 
| Directive<scala.Tuple1<RequestEntity>> | extractRequestEntity()Extracts the  pekko.http.scaladsl.model.RequestEntityfrom thepekko.http.scaladsl.server.RequestContext. | 
| Directive<scala.Tuple1<RoutingSettings>> | extractSettings()Extracts the  RoutingSettingsfrom thepekko.http.scaladsl.server.RequestContext. | 
| Directive<scala.Tuple1<HttpEntity.Strict>> | extractStrictEntity(scala.concurrent.duration.FiniteDuration timeout)WARNING: This will read the entire request entity into memory and effectively disable streaming. | 
| Directive<scala.Tuple1<HttpEntity.Strict>> | extractStrictEntity(scala.concurrent.duration.FiniteDuration timeout,
                   long maxBytes)WARNING: This will read the entire request entity into memory and effectively disable streaming. | 
| Directive<scala.Tuple1<Uri.Path>> | extractUnmatchedPath()Extracts the yet unmatched path from the RequestContext. | 
| Directive<scala.Tuple1<Uri>> | extractUri()Extracts the complete request URI. | 
| Directive<scala.runtime.BoxedUnit> | mapInnerRoute(scala.Function1<scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>>,scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>>> f) | 
| Directive<scala.runtime.BoxedUnit> | mapRejections(scala.Function1<scala.collection.immutable.Seq<Rejection>,scala.collection.immutable.Seq<Rejection>> f) | 
| Directive<scala.runtime.BoxedUnit> | mapRequest(scala.Function1<HttpRequest,HttpRequest> f) | 
| Directive<scala.runtime.BoxedUnit> | mapRequestContext(scala.Function1<RequestContext,RequestContext> f) | 
| Directive<scala.runtime.BoxedUnit> | mapResponse(scala.Function1<HttpResponse,HttpResponse> f) | 
| Directive<scala.runtime.BoxedUnit> | mapResponseEntity(scala.Function1<ResponseEntity,ResponseEntity> f) | 
| Directive<scala.runtime.BoxedUnit> | mapResponseHeaders(scala.Function1<scala.collection.immutable.Seq<HttpHeader>,scala.collection.immutable.Seq<HttpHeader>> f) | 
| Directive<scala.runtime.BoxedUnit> | mapRouteResult(scala.Function1<RouteResult,RouteResult> f) | 
| Directive<scala.runtime.BoxedUnit> | mapRouteResultFuture(scala.Function1<scala.concurrent.Future<RouteResult>,scala.concurrent.Future<RouteResult>> f) | 
| Directive<scala.runtime.BoxedUnit> | mapRouteResultPF(scala.PartialFunction<RouteResult,RouteResult> f) | 
| Directive<scala.runtime.BoxedUnit> | mapRouteResultWith(scala.Function1<RouteResult,scala.concurrent.Future<RouteResult>> f) | 
| Directive<scala.runtime.BoxedUnit> | mapRouteResultWithPF(scala.PartialFunction<RouteResult,scala.concurrent.Future<RouteResult>> f) | 
| Directive<scala.runtime.BoxedUnit> | mapSettings(scala.Function1<RoutingSettings,RoutingSettings> f)Runs the inner route with settings mapped by the given function. | 
| Directive<scala.runtime.BoxedUnit> | mapUnmatchedPath(scala.Function1<Uri.Path,Uri.Path> f)Transforms the unmatchedPath of the RequestContext using the given function. | 
| Directive<scala.runtime.BoxedUnit> | pass()A Directive0 that always passes the request on to its inner route
 (i.e. does nothing with the request or the response). | 
| <T> Directive<scala.Tuple1<T>> | provide(T value)Injects the given value into a directive. | 
| Directive<scala.runtime.BoxedUnit> | recoverRejections(scala.Function1<scala.collection.immutable.Seq<Rejection>,RouteResult> f) | 
| Directive<scala.runtime.BoxedUnit> | recoverRejectionsWith(scala.Function1<scala.collection.immutable.Seq<Rejection>,scala.concurrent.Future<RouteResult>> f) | 
| <L> Directive<L> | textract(scala.Function1<RequestContext,L> f,
        Tuple<L> evidence$2)Extracts a number of values using the given function. | 
| Directive<scala.runtime.BoxedUnit> | toStrictEntity(scala.concurrent.duration.FiniteDuration timeout)WARNING: This will read the entire request entity into memory and effectively disable streaming. | 
| Directive<scala.runtime.BoxedUnit> | toStrictEntity(scala.concurrent.duration.FiniteDuration timeout,
              long maxBytes)WARNING: This will read the entire request entity into memory and effectively disable streaming. | 
| <L> Directive<L> | tprovide(L values,
        Tuple<L> evidence$1)Injects the given values into a directive. | 
| Directive<scala.runtime.BoxedUnit> | withExecutionContext(scala.concurrent.ExecutionContextExecutor ec)Runs its inner route with the given alternative  ExecutionContextExecutor. | 
| Directive<scala.runtime.BoxedUnit> | withLog(org.apache.pekko.event.LoggingAdapter log)Runs its inner route with the given alternative  pekko.event.LoggingAdapter. | 
| Directive<scala.runtime.BoxedUnit> | withMaterializer(org.apache.pekko.stream.Materializer materializer)Runs its inner route with the given alternative  pekko.stream.Materializer. | 
| Directive<scala.runtime.BoxedUnit> | withSettings(RoutingSettings settings)Runs its inner route with the given alternative  RoutingSettings. | 
Directive<scala.runtime.BoxedUnit> mapInnerRoute(scala.Function1<scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>>,scala.Function1<RequestContext,scala.concurrent.Future<RouteResult>>> f)
f - (undocumented)Directive<scala.runtime.BoxedUnit> mapRequestContext(scala.Function1<RequestContext,RequestContext> f)
f - (undocumented)Directive<scala.runtime.BoxedUnit> mapRequest(scala.Function1<HttpRequest,HttpRequest> f)
f - (undocumented)Directive<scala.runtime.BoxedUnit> mapRouteResultFuture(scala.Function1<scala.concurrent.Future<RouteResult>,scala.concurrent.Future<RouteResult>> f)
f - (undocumented)Directive<scala.runtime.BoxedUnit> mapRouteResult(scala.Function1<RouteResult,RouteResult> f)
f - (undocumented)Directive<scala.runtime.BoxedUnit> mapRouteResultWith(scala.Function1<RouteResult,scala.concurrent.Future<RouteResult>> f)
f - (undocumented)Directive<scala.runtime.BoxedUnit> mapRouteResultPF(scala.PartialFunction<RouteResult,RouteResult> f)
f - (undocumented)Directive<scala.runtime.BoxedUnit> mapRouteResultWithPF(scala.PartialFunction<RouteResult,scala.concurrent.Future<RouteResult>> f)
f - (undocumented)Directive<scala.runtime.BoxedUnit> recoverRejections(scala.Function1<scala.collection.immutable.Seq<Rejection>,RouteResult> f)
f - (undocumented)Directive<scala.runtime.BoxedUnit> recoverRejectionsWith(scala.Function1<scala.collection.immutable.Seq<Rejection>,scala.concurrent.Future<RouteResult>> f)
f - (undocumented)Directive<scala.runtime.BoxedUnit> mapRejections(scala.Function1<scala.collection.immutable.Seq<Rejection>,scala.collection.immutable.Seq<Rejection>> f)
f - (undocumented)Directive<scala.runtime.BoxedUnit> mapResponse(scala.Function1<HttpResponse,HttpResponse> f)
f - (undocumented)Directive<scala.runtime.BoxedUnit> mapResponseEntity(scala.Function1<ResponseEntity,ResponseEntity> f)
f - (undocumented)Directive<scala.runtime.BoxedUnit> mapResponseHeaders(scala.Function1<scala.collection.immutable.Seq<HttpHeader>,scala.collection.immutable.Seq<HttpHeader>> f)
f - (undocumented)Directive<scala.runtime.BoxedUnit> pass()
<T> Directive<scala.Tuple1<T>> provide(T value)
value - (undocumented)<L> Directive<L> tprovide(L values, Tuple<L> evidence$1)
values - (undocumented)evidence$1 - (undocumented)<T> Directive<scala.Tuple1<T>> extract(scala.Function1<RequestContext,T> f)
f - (undocumented)<L> Directive<L> textract(scala.Function1<RequestContext,L> f, Tuple<L> evidence$2)
f - (undocumented)evidence$2 - (undocumented)Directive<scala.runtime.BoxedUnit> cancelRejection(Rejection rejection)
rejection - (undocumented)Directive<scala.runtime.BoxedUnit> cancelRejections(scala.collection.immutable.Seq<java.lang.Class<?>> classes)
classes - (undocumented)Directive<scala.runtime.BoxedUnit> cancelRejections(scala.Function1<Rejection,java.lang.Object> cancelFilter)
cancelFilter - (undocumented)Directive<scala.runtime.BoxedUnit> mapUnmatchedPath(scala.Function1<Uri.Path,Uri.Path> f)
f - (undocumented)Directive<scala.Tuple1<Uri.Path>> extractUnmatchedPath()
Directive<scala.Tuple1<Uri.Path>> extractMatchedPath()
Directive<scala.Tuple1<HttpRequest>> extractRequest()
HttpRequest instance.
 Directive<scala.Tuple1<Uri>> extractUri()
Directive<scala.runtime.BoxedUnit> withExecutionContext(scala.concurrent.ExecutionContextExecutor ec)
ExecutionContextExecutor.
 ec - (undocumented)Directive<scala.Tuple1<scala.concurrent.ExecutionContextExecutor>> extractExecutionContext()
ExecutionContextExecutor from the pekko.http.scaladsl.server.RequestContext.
 Directive<scala.runtime.BoxedUnit> withMaterializer(org.apache.pekko.stream.Materializer materializer)
pekko.stream.Materializer.
 materializer - (undocumented)Directive<scala.Tuple1<org.apache.pekko.stream.Materializer>> extractMaterializer()
pekko.stream.Materializer from the pekko.http.scaladsl.server.RequestContext.
 Directive<scala.Tuple1<org.apache.pekko.actor.ActorSystem>> extractActorSystem()
pekko.actor.ActorSystem if the available Materializer is an pekko.stream.ActorMaterializer.
 Otherwise throws an exception as it won't be able to extract the system from arbitrary materializers.
 Directive<scala.runtime.BoxedUnit> withLog(org.apache.pekko.event.LoggingAdapter log)
pekko.event.LoggingAdapter.
 log - (undocumented)Directive<scala.Tuple1<org.apache.pekko.event.LoggingAdapter>> extractLog()
pekko.event.LoggingAdapter from the pekko.http.scaladsl.server.RequestContext.
 Directive<scala.runtime.BoxedUnit> withSettings(RoutingSettings settings)
RoutingSettings.
 settings - (undocumented)Directive<scala.runtime.BoxedUnit> mapSettings(scala.Function1<RoutingSettings,RoutingSettings> f)
f - (undocumented)Directive<scala.Tuple1<RoutingSettings>> extractSettings()
RoutingSettings from the pekko.http.scaladsl.server.RequestContext.
 Directive<scala.Tuple1<ParserSettings>> extractParserSettings()
pekko.http.scaladsl.settings.ParserSettings from the pekko.http.scaladsl.server.RequestContext.
 Directive<scala.Tuple1<RequestContext>> extractRequestContext()
pekko.http.scaladsl.server.RequestContext itself.
 Directive<scala.Tuple1<RequestEntity>> extractRequestEntity()
pekko.http.scaladsl.model.RequestEntity from the pekko.http.scaladsl.server.RequestContext.
 Directive<scala.Tuple1<org.apache.pekko.stream.scaladsl.Source<org.apache.pekko.util.ByteString,java.lang.Object>>> extractDataBytes()
dataBytes pekko.stream.scaladsl.Source from the pekko.http.scaladsl.server.RequestContext.
 Directive<scala.Tuple1<HttpEntity.Strict>> extractStrictEntity(scala.concurrent.duration.FiniteDuration timeout)
 To help protect against excessive memory use, the request will be aborted if the request is larger
 than allowed by the pekko.http.parsing.max-to-strict-bytes configuration setting.
 
 Converts the HttpEntity from the pekko.http.scaladsl.server.RequestContext into an
 pekko.http.scaladsl.model.HttpEntity.Strict and extracts it, or fails the route if unable to drain the
 entire request body within the timeout.
 
timeout - The directive is failed if the stream isn't completed after the given timeout.Directive<scala.Tuple1<HttpEntity.Strict>> extractStrictEntity(scala.concurrent.duration.FiniteDuration timeout, long maxBytes)
 To help protect against excessive memory use, the request will be aborted if the request is larger
 than allowed by the pekko.http.parsing.max-to-strict-bytes configuration setting.
 
 Converts the HttpEntity from the pekko.http.scaladsl.server.RequestContext into an
 pekko.http.scaladsl.model.HttpEntity.Strict and extracts it, or fails the route if unable to drain the
 entire request body within the timeout.
 
timeout - The directive is failed if the stream isn't completed after the given timeout.maxBytes - (undocumented)Directive<scala.runtime.BoxedUnit> toStrictEntity(scala.concurrent.duration.FiniteDuration timeout)
 To help protect against excessive memory use, the request will be aborted if the request is larger
 than allowed by the pekko.http.parsing.max-to-strict-bytes configuration setting.
 
 Extracts the pekko.http.scaladsl.server.RequestContext itself with the strict HTTP entity,
 or fails the route if unable to drain the entire request body within the timeout.
 
timeout - The directive is failed if the stream isn't completed after the given timeout.Directive<scala.runtime.BoxedUnit> toStrictEntity(scala.concurrent.duration.FiniteDuration timeout, long maxBytes)
 To help protect against excessive memory use, the request will be aborted if the request is larger
 than allowed by the pekko.http.parsing.max-to-strict-bytes configuration setting.
 
 Extracts the pekko.http.scaladsl.server.RequestContext itself with the strict HTTP entity,
 or fails the route if unable to drain the entire request body within the timeout.
 
timeout - The directive is failed if the stream isn't completed after the given timeout.maxBytes - (undocumented)