Attributes
- Companion
- trait
- Source
- MiscDirectives.scala
- Graph
-
- Supertypes
- Self type
-
MiscDirectives.type
Members list
Grouped members
misc
Extracts the client's IP from either the X-Forwarded-For, Remote-Address, X-Real-IP header or pekko.http.scaladsl.model.AttributeKeys.remoteAddress attribute (in that order of priority).
Extracts the client's IP from either the X-Forwarded-For, Remote-Address, X-Real-IP header or pekko.http.scaladsl.model.AttributeKeys.remoteAddress attribute (in that order of priority).
Attributes
- Inherited from:
- MiscDirectives
- Source
- MiscDirectives.scala
Converts responses with an empty entity into (empty) rejections. This way you can, for example, have the marshalling of a ''None'' option be treated as if the request could not be matched.
Converts responses with an empty entity into (empty) rejections. This way you can, for example, have the marshalling of a ''None'' option be treated as if the request could not be matched.
Attributes
- Inherited from:
- MiscDirectives
- Source
- MiscDirectives.scala
Rejects if the request entity is non-empty.
Rejects if the request entity is non-empty.
Attributes
- Inherited from:
- MiscDirectives
- Source
- MiscDirectives.scala
Rejects with a RequestEntityExpectedRejection if the request entity is empty. Non-empty requests are passed on unchanged to the inner route.
Rejects with a RequestEntityExpectedRejection if the request entity is empty. Non-empty requests are passed on unchanged to the inner route.
Attributes
- Inherited from:
- MiscDirectives
- Source
- MiscDirectives.scala
Inspects the request's Accept-Language header and determines, which of the given language alternatives is preferred by the client. (See http://tools.ietf.org/html/rfc7231#section-5.3.5 for more details on the negotiation logic.) If there are several best language alternatives that the client has equal preference for (even if this preference is zero!) the order of the arguments is used as a tie breaker (First one wins).
Inspects the request's Accept-Language header and determines, which of the given language alternatives is preferred by the client. (See http://tools.ietf.org/html/rfc7231#section-5.3.5 for more details on the negotiation logic.) If there are several best language alternatives that the client has equal preference for (even if this preference is zero!) the order of the arguments is used as a tie breaker (First one wins).
Attributes
- Inherited from:
- MiscDirectives
- Source
- MiscDirectives.scala
Checks the given condition before running its inner route. If the condition fails the route is rejected with a ValidationRejection.
Checks the given condition before running its inner route. If the condition fails the route is rejected with a ValidationRejection.
Attributes
- Inherited from:
- MiscDirectives
- Source
- MiscDirectives.scala
Fails the stream with pekko.http.scaladsl.model.EntityStreamSizeException if its request entity size exceeds given limit. Limit given as parameter overrides limit configured with pekko.http.parsing.max-content-length.
Fails the stream with pekko.http.scaladsl.model.EntityStreamSizeException if its request entity size exceeds given limit. Limit given as parameter overrides limit configured with pekko.http.parsing.max-content-length.
Beware that request entity size check is executed when entity is consumed.
Attributes
- Inherited from:
- MiscDirectives
- Source
- MiscDirectives.scala
Disables the size limit (configured by pekko.http.parsing.max-content-length by default) checking on the incoming HttpRequest entity. Can be useful when handling arbitrarily large data uploads in specific parts of your routes.
Disables the size limit (configured by pekko.http.parsing.max-content-length by default) checking on the incoming HttpRequest entity. Can be useful when handling arbitrarily large data uploads in specific parts of your routes.
Attributes
- Note
-
Usage of
withoutSizeLimitis not recommended as it turns off the too large payload protection. Therefore, we highly encourage usingwithSizeLimitinstead, providing it with a value high enough to successfully handle the route in need of big entities. - Inherited from:
- MiscDirectives
- Source
- MiscDirectives.scala