| @refalwaysCache | Wraps its inner Route with caching support using the given @apidoc[Cache] implementation and the in-scope keyer function. |
| @refattribute | Extracts the value of the request attribute with a given key |
| @refauthenticateBasic | Wraps the inner route with Http Basic authentication support using a given @scala[Authenticator[T]]@java[Authenticator<T>] |
| @refauthenticateBasicAsync | Wraps the inner route with Http Basic authentication support using a given @scala[AsyncAuthenticator[T]]@java[AsyncAuthenticator<T>] |
| @refauthenticateBasicPF | Wraps the inner route with Http Basic authentication support using a given @scala[AuthenticatorPF[T]]@java[AuthenticatorPF<T>] |
| @refauthenticateBasicPFAsync | Wraps the inner route with Http Basic authentication support using a given @scala[AsyncAuthenticatorPF[T]]@java[AsyncAuthenticatorPF<T>] |
| @refauthenticateOAuth2 | Wraps the inner route with OAuth Bearer Token authentication support using a given @scala[AuthenticatorPF[T]]@java[AuthenticatorPF<T>] |
| @refauthenticateOAuth2Async | Wraps the inner route with OAuth Bearer Token authentication support using a given @scala[AsyncAuthenticator[T]]@java[AsyncAuthenticator<T>] |
| @refauthenticateOAuth2PF | Wraps the inner route with OAuth Bearer Token authentication support using a given @scala[AuthenticatorPF[T]]@java[AuthenticatorPF<T>] |
| @refauthenticateOAuth2PFAsync | Wraps the inner route with OAuth Bearer Token authentication support using a given @scala[AsyncAuthenticatorPF[T]]@java[AsyncAuthenticatorPF<T>] |
| @refauthenticateOrRejectWithChallenge | Lifts an authenticator function into a directive |
| @refauthorize | Applies the given authorization check to the request |
| @refauthorizeAsync | Applies the given asynchronous authorization check to the request |
| @refcache | Wraps its inner Route with caching support using the given @apidoc[Cache] implementation and the in-scope keyer function. |
| @refcachingProhibited | Passes only requests that explicitly forbid caching with a Cache-Control header with either a no-cache or max-age=0 setting. |
| @refcancelRejection | Adds a @apidoc[TransformationRejection] cancelling all rejections equal to the given one to the rejections potentially coming back from the inner route. |
| @refcancelRejections | Adds a @apidoc[TransformationRejection] cancelling all matching rejections to the rejections potentially coming back from the inner route |
| @refcheckSameOrigin | Checks that the request comes from the same origin |
| @refcomplete | Completes the request using the given arguments |
| @refcompleteOrRecoverWith | “Unwraps” a @scala[Future[T]]@java[CompletionStage<T>] and runs the inner route when the future has failed with the error as an extraction of type Throwable |
| @refcompleteWith | Uses the marshaller for a given type to extract a completion function |
| @refconditional | Wraps its inner route with support for conditional requests as defined by RFC 7232 |
| @refcookie | Extracts the @apidoc[HttpCookie] with the given name |
| @refdecodeRequest | Decompresses the request if it is gzip or deflate compressed |
| @refdecodeRequestWith | Decodes the incoming request using one of the given decoders |
| @refdelete | Rejects all non-DELETE requests |
| @refdeleteCookie | Adds a Set-Cookie response header expiring the given cookies |
| @refencodeResponse | Encodes the response with the encoding that is requested by the client via the Accept-Encoding header (NoCoding, Gzip and Deflate) |
| @refencodeResponseWith | Encodes the response with the encoding that is requested by the client via the Accept-Encoding header (from a user-defined set) |
| @refentity | Extracts the request entity unmarshalled to a given type |
| @refextract | Extracts a single value using a @scala[RequestContext => T]@java[Function<RequestContext, T>] function |
| @scala[@refextractDataBytes] | @scala[Extracts the entities data bytes as a stream @apidoc[Source[ByteString, _]]] |
| @refextractClientIP | Extracts the client's IP from either the X-Forwarded- or X-Real-IP header |
| @refextractCredentials | Extracts the potentially present @apidoc[HttpCredentials] provided with the request's @apidoc[Authorization] header |
| @refextractExecutionContext | Extracts the ExecutionContext from the @apidoc[RequestContext] |
| @refextractMatchedPath | Extracts the already matched path from the @apidoc[RequestContext] |
| @refextractMaterializer | Extracts the @apidoc[Materializer] from the @apidoc[RequestContext] |
| @refextractHost | Extracts the hostname part of the Host request header value |
| @refextractLog | Extracts the @apidoc[LoggingAdapter] from the @apidoc[RequestContext] |
| @refextractMethod | Extracts the request method |
| @refextractOfferedWsProtocols | Extract the list of websocket subprotocols offered by the client in the Sec-WebSocket-Protocol header if this is a websocket request and otherwise rejects with an @apidoc[ExpectedWebSocketRequestRejection$] |
| @refextractParserSettings | Extracts the @apidoc[ParserSettings] from the @apidoc[RequestContext] |
| @refextractRequest | Extracts the current @apidoc[HttpRequest] instance |
| @refextractRequestContext | Extracts the @apidoc[RequestContext] itself |
| @scala[@refextractRequestEntity] | @scala[Extracts the @apidoc[RequestEntity] from the @apidoc[RequestContext]] |
| @refextractScheme | Extracts the URI scheme from the request |
| @refextractSettings | Extracts the @apidoc[RoutingSettings] from the @apidoc[RequestContext] |
| @refextractUnmatchedPath | Extracts the yet unmatched path from the @apidoc[RequestContext] |
| @refextractUri | Extracts the complete request URI |
| @reffailWith | Bubbles the given error up the response chain where it is dealt with by the closest @refhandleExceptions directive and its @apidoc[ExceptionHandler] |
| @reffileUpload | Provides a stream of an uploaded file from a multipart request |
| @reffileUploadAll | Provides streams of all uploaded files from a multipart request |
| @refformField | Extracts an HTTP form field (of Content-Type application/x-www-form-urlencoded or multipart/form-data) from the request |
| @refformFieldMap | Extracts a number of HTTP form field (of Content-Type application/x-www-form-urlencoded or multipart/form-data) from the request as a @scala[Map[String, String]]@java[Map<String, String>] |
| @refformFieldMultiMap | Extracts a number of HTTP form field (of Content-Type application/x-www-form-urlencoded or multipart/form-data) from the request as a @scala[Map[String, List[String]]]@java[Map<String, List<String>>] |
| @scala[@refformFields] | @scala[Extracts a number of HTTP form field (of Content-Type application/x-www-form-urlencoded or multipart/form-data) from the request] |
| @refformFieldSeq | Extracts a number of HTTP form field (of Content-Type application/x-www-form-urlencoded or multipart/form-data) from the request as a @scala[Seq[(String, String)]]@java[List<Map.Entry<String, String>>] |
| @refget | Rejects all non-GET requests |
| @refgetFromBrowseableDirectories | Serves the content of the given directories as a file-system browser, i.e. files are sent and directories served as browseable listings |
| @refgetFromBrowseableDirectory | Serves the content of the given directory as a file-system browser, i.e. files are sent and directories served as browseable listings |
| @refgetFromDirectory | Completes GET requests with the content of a file underneath a given file-system directory |
| @refgetFromFile | Completes GET requests with the content of a given file |
| @refgetFromResource | Completes GET requests with the content of a given class-path resource |
| @refgetFromResourceDirectory | Completes GET requests with the content of a file underneath a given “class-path resource directory” |
| @refhandleExceptions | Transforms exceptions thrown during evaluation of the inner route using the given @apidoc[ExceptionHandler] |
| @refhandleRejections | Transforms rejections produced by the inner route using the given RejectionHandler |
| @refhandleWebSocketMessages | Handles websocket requests with the given handler and rejects other requests with an @apidoc[ExpectedWebSocketRequestRejection$] |
| @refhandleWebSocketMessagesForOptionalProtocol | Handles websocket requests with the given handler if the subprotocol matches and rejects other requests. If the subprotocol parameter is @scala[None]@java[empty] any WebSocket request is accepted.. |
| @refhandleWebSocketMessagesForProtocol | Handles websocket requests with the given handler if the subprotocol matches and rejects other requests with an @apidoc[ExpectedWebSocketRequestRejection$] or an @apidoc[UnsupportedWebSocketSubprotocolRejection]. |
| @refhandleWith | Completes the request using a given function |
| @refhead | Rejects all non-HEAD requests |
| @refheaderValue | Extracts an HTTP header value using a given @scala[HttpHeader => Option[T]]@java[Function<HttpHeader, Optional<T>>] function |
| @refheaderValueByName | Extracts the value of the first HTTP request header with a given name |
| @refheaderValueByType | Extracts the first HTTP request header of the given type |
| @refheaderValuePF | Extracts an HTTP header value using a given @scala[PartialFunction[HttpHeader, T]]]@java[PartialFunction<HttpHeader, T>] |
| @refhost | Rejects all requests with a non-matching host name |
| @refignoreTrailingSlash | Retries the inner route adding (or removing) the trailing slash in case of empty rejections |
| @reflistDirectoryContents | Completes GET requests with a unified listing of the contents of all given file-system directories |
| @reflogRequest | Produces a log entry for every incoming request |
| @reflogRequestResult | Produces a log entry for every incoming request and @apidoc[RouteResult] |
| @reflogResult | Produces a log entry for every @apidoc[RouteResult] |
| @refmapInnerRoute | Transforms its inner @scala[@scaladocRoute]@java[@javadocRoute] with a @scala[Route => Route]@java[UnaryOperator<Route>] function |
| @refmapRejections | Transforms rejections from a previous route with an @scala[immutable.Seq[Rejection] => immutable.Seq[Rejection]]@java[UnaryOperator<List<Rejection>>] function |
| @refmapRequest | Transforms the request with an @scala[HttpRequest => HttpRequest]@java[UnaryOperator<HttpRequest>] function |
| @refmapRequestContext | Transforms the @apidoc[RequestContext] with a @scala[RequestContext => RequestContext]@java[UnaryOperator<RequestContext>] function |
| @refmapResponse | Transforms the response with an @scala[HttpResponse => HttpResponse]@java[UnaryOperator<HttpResponse>] function |
| @refmapResponseEntity | Transforms the response entity with an @scala[ResponseEntity => ResponseEntity]@java[UnaryOperator<ResponseEntity>] function |
| @refmapResponseHeaders | Transforms the response headers with an @scala[immutable.Seq[HttpHeader] => immutable.Seq[HttpHeader]]@java[UnaryOperator<List<HttpHeader>>] function |
| @refmapRouteResult | Transforms the @apidoc[RouteResult] with a @scala[RouteResult => RouteResult]@java[UnaryOperator<RouteResult>] function |
| @refmapRouteResultFuture | Transforms the @apidoc[RouteResult] future with a @scala[Future[RouteResult] => Future[RouteResult]]@java[UnaryOperator<CompletionStage<RouteResult>>] function |
| @refmapRouteResultPF | Transforms the @apidoc[RouteResult] with a @scala[PartialFunction[RouteResult, RouteResult]]@java[PartialFunction<RouteResult, RouteResult>] |
| @refmapRouteResultWith | Transforms the @apidoc[RouteResult] with a @scala[RouteResult => Future[RouteResult]]@java[Function<RouteResult, CompletionStage<RouteResult>>] function |
| @refmapRouteResultWithPF | Transforms the @apidoc[RouteResult] with a @scala[PartialFunction[RouteResult, Future[RouteResult]]]@java[PartialFunction<RouteResult, CompletionStage<RouteResult>>] |
| @refmapSettings | Transforms the @apidoc[RoutingSettings] with a @scala[RoutingSettings => RoutingSettings]@java[UnaryOperator<RoutingSettings>] function |
| @refmapUnmatchedPath | Transforms the unmatchedPath of the @apidoc[RequestContext] using a @scala[Uri.Path => Uri.Path]@java[UnaryOperator<Uri.Path>] function |
| @refmethod | Rejects all requests whose HTTP method does not match the given one |
| @refonComplete | “Unwraps” a @scala[Future[T]]@java[CompletionStage<T>] and runs the inner route after future completion with the future's value as an extraction of type @scala[Try[T]]@java[Try<T>] |
| @refonCompleteWithBreaker | “Unwraps” a @scala[Future[T]]@java[CompletionStage<T>] inside a @apidoc[CircuitBreaker] and runs the inner route after future completion with the future's value as an extraction of type @scala[Try[T]]@java[Try<T>] |
| @refonSuccess | “Unwraps” a @scala[Future[T]]@java[CompletionStage<T>] and runs the inner route after future completion with the future's value as an extraction of type T |
| @refoptionalAttribute | Extracts the value of an optional request attribute with a given key |
| @refoptionalCookie | Extracts the @apidoc[HttpCookiePair] with the given name as an @scala[Option[HttpCookiePair]]@java[Optional<HttpCookiePair>] |
| @refoptionalHeaderValue | Extracts an optional HTTP header value using a given @scala[HttpHeader => Option[T]]@java[Function<HttpHeader, Optional<T>>] function |
| @refoptionalHeaderValueByName | Extracts the value of the first optional HTTP request header with a given name |
| @refoptionalHeaderValueByType | Extracts the first optional HTTP request header of the given type |
| @refoptionalHeaderValuePF | Extracts an optional HTTP header value using a given @scala[PartialFunction[HttpHeader, T]]@java[PartialFunction<HttpHeader, T>] |
| @refoptions | Rejects all non-OPTIONS requests |
| @refoverrideMethodWithParameter | Changes the request method to the value of the specified query parameter |
| @refparameter | Extracts a query parameter value from the request |
| @refparameterMap | Extracts the request's query parameters as a @scala[Map[String, String]]@java[Map<String, String>] |
| @refparameterMultiMap | Extracts the request's query parameters as a @scala[Map[String, List[String]]]@java[Map<String, List<String>>] |
| @scala[@refparameters] | @scala[Extracts a number of query parameter values from the request] |
| @refparameterSeq | Extracts the request's query parameters as a @scala[Seq[(String, String)]]@java[List<Map.Entry<String, String>>] |
| @refpass | Always simply passes the request on to its inner route, i.e. doesn't do anything, neither with the request nor the response |
| @refpatch | Rejects all non-PATCH requests |
| @refpath | Applies the given PathMatcher to the remaining unmatched path after consuming a leading slash |
| @refpathEnd | Only passes on the request to its inner route if the request path has been matched completely |
| @refpathEndOrSingleSlash | Only passes on the request to its inner route if the request path has been matched completely or only consists of exactly one remaining slash |
| @refpathPrefix | Applies the given PathMatcher to a prefix of the remaining unmatched path after consuming a leading slash |
| @refpathPrefixTest | Checks whether the unmatchedPath has a prefix matched by the given PathMatcher after implicitly consuming a leading slash |
| @refpathSingleSlash | Only passes on the request to its inner route if the request path consists of exactly one remaining slash |
| @refpathSuffix | Applies the given PathMatcher to a suffix of the remaining unmatched path (Caution: check @scala[scaladoc]@java[java]!) |
| @refpathSuffixTest | Checks whether the unmatched path has a suffix matched by the given PathMatcher (Caution: check @scala[scaladoc]@java[java]!) |
| @refpost | Rejects all non-POST requests |
| @refprovide | Injects a given value into a directive |
| @refput | Rejects all non-PUT requests |
| @refquery | Rejects all non-QUERY requests |
| @refrawPathPrefix | Applies the given matcher directly to a prefix of the unmatched path of the @apidoc[RequestContext], without implicitly consuming a leading slash |
| @refrawPathPrefixTest | Checks whether the unmatchedPath has a prefix matched by the given PathMatcher |
| @refrecoverRejections | Transforms rejections from the inner route with an @scala[immutable.Seq[Rejection] => RouteResult]@java[Function<List<Rejection>, RouteResult>] function |
| @refrecoverRejectionsWith | Transforms rejections from the inner route with an @scala[immutable.Seq[Rejection] => Future[RouteResult]]@java[Function<List<Rejection], CompletionStage<RouteResult>>] function |
| @refredirect | Completes the request with redirection response of the given type to the given URI |
| @refredirectToNoTrailingSlashIfPresent | If the request path ends with a slash, redirects to the same URI without trailing slash in the path |
| @refredirectToTrailingSlashIfMissing | If the request path doesn't end with a slash, redirects to the same URI with trailing slash in the path |
| @refreject | Rejects the request with the given rejections |
| @refrejectEmptyResponse | Converts responses with an empty entity into (empty) rejections |
| @refrequestEncodedWith | Rejects the request with an @apidoc[UnsupportedRequestEncodingRejection] if its encoding doesn't match the given one |
| @refrequestEntityEmpty | Rejects if the request entity is non-empty |
| @refrequestEntityPresent | Rejects with a @apidoc[RequestEntityExpectedRejection$] if the request entity is empty |
| @refrespondWithDefaultHeader | Adds a given response header if the response doesn't already contain a header with the same name |
| @refrespondWithDefaultHeaders | Adds the subset of the given headers to the response which doesn't already have a header with the respective name present in the response |
| @refrespondWithHeader | Unconditionally adds a given header to the outgoing response |
| @refrespondWithHeaders | Unconditionally adds the given headers to the outgoing response |
| @refresponseEncodingAccepted | Rejects the request with an @apidoc[UnacceptedResponseEncodingRejection] if the given response encoding is not accepted by the client |
| @refscheme | Rejects all requests whose URI scheme doesn't match the given one |
| @refselectPreferredLanguage | Inspects the request's Accept-Language header and determines, which of a given set of language alternatives is preferred by the client |
| @refsetCookie | Adds a Set-Cookie response header with the given cookies |
| @refstoreUploadedFile | Streams one uploaded file from a multipart request to a file on disk |
| @refstoreUploadedFiles | Streams all uploaded files from a multipart request to files on disk |
| @scala[@reftextract] | @scala[Extracts a number of values using a RequestContext => Tuple function] |
| @scala[@reftprovide] | @scala[Injects a given tuple of values into a directive] |
| @refvalidate | Checks a given condition before running its inner route |
| @refwithoutRequestTimeout | Disables @refrequest timeouts for a given route. |
| @refwithoutSizeLimit | Skips request entity size check |
| @refwithExecutionContext | Runs its inner route with the given alternative ExecutionContext |
| @refwithLog | Runs its inner route with the given alternative @apidoc[LoggingAdapter] |
| @refwithMaterializer | Runs its inner route with the given alternative @apidoc[Materializer] |
| @refwithPrecompressedMediaTypeSupport | Adds a Content-Encoding: gzip response header if the entity's media-type is precompressed with gzip header |
| @refwithRangeSupport | Adds Accept-Ranges: bytes to responses to GET requests, produces partial responses if the initial request contained a valid Range header |
| @refwithRequestTimeout | Configures the @refrequest timeouts for a given route. |
| @refwithRequestTimeoutResponse | Prepares the @apidoc[HttpResponse] that is emitted if a request timeout is triggered. RequestContext => RequestContext function |
| @refwithSettings | Runs its inner route with the given alternative @apidoc[RoutingSettings] |
| @refwithSizeLimit | Applies request entity size check |