This commit is contained in:
parent
e0d73187bd
commit
6fb2d176a1
10 changed files with 279 additions and 1 deletions
|
|
@ -0,0 +1,23 @@
|
|||
.. _-extractStrictEntity-java-:
|
||||
|
||||
extractStrictEntity
|
||||
===================
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Extracts the strict http entity as ``HttpEntity.Strict`` from the :class:`RequestContext`.
|
||||
|
||||
A timeout parameter is given and if the stream isn't completed after the timeout, the directive will be failed.
|
||||
|
||||
.. warning::
|
||||
|
||||
The directive will read the request entity into memory within the size limit(8M by default) and effectively disable streaming.
|
||||
The size limit can be configured globally with ``akka.http.parsing.max-content-length`` or
|
||||
overridden by wrapping with :ref:`-withSizeLimit-java-` or :ref:`-withoutSizeLimit-java-` directive.
|
||||
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
.. includecode:: ../../../../code/docs/http/javadsl/server/directives/BasicDirectivesExamplesTest.java#extractStrictEntity
|
||||
|
|
@ -19,6 +19,7 @@ a single value or a tuple of values.
|
|||
* :ref:`-extract-java-`
|
||||
* :ref:`-extractExecutionContext-java-`
|
||||
* :ref:`-extractMaterializer-java-`
|
||||
* :ref:`-extractStrictEntity-java-`
|
||||
* :ref:`-extractLog-java-`
|
||||
* :ref:`-extractRequest-java-`
|
||||
* :ref:`-extractRequestContext-java-`
|
||||
|
|
@ -41,6 +42,7 @@ Transforming the Request(Context)
|
|||
* :ref:`-withMaterializer-java-`
|
||||
* :ref:`-withLog-java-`
|
||||
* :ref:`-withSettings-java-`
|
||||
* :ref:`-toStrictEntity-java-`
|
||||
|
||||
|
||||
.. _Response Transforming Directives-java:
|
||||
|
|
@ -93,6 +95,7 @@ Alphabetically
|
|||
extract
|
||||
extractExecutionContext
|
||||
extractMaterializer
|
||||
extractStrictEntity
|
||||
extractLog
|
||||
extractRequest
|
||||
extractRequestContext
|
||||
|
|
@ -117,6 +120,7 @@ Alphabetically
|
|||
provide
|
||||
recoverRejections
|
||||
recoverRejectionsWith
|
||||
toStrictEntity
|
||||
withExecutionContext
|
||||
withMaterializer
|
||||
withLog
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
.. _-toStrictEntity-java-:
|
||||
|
||||
toStrictEntity
|
||||
==============
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Transforms the request entity to strict entity before it is handled by the inner route.
|
||||
|
||||
A timeout parameter is given and if the stream isn't completed after the timeout, the directive will be failed.
|
||||
|
||||
.. warning::
|
||||
|
||||
The directive will read the request entity into memory within the size limit(8M by default) and effectively disable streaming.
|
||||
The size limit can be configured globally with ``akka.http.parsing.max-content-length`` or
|
||||
overridden by wrapping with :ref:`-withSizeLimit-java-` or :ref:`-withoutSizeLimit-java-` directive.
|
||||
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
.. includecode:: ../../../../code/docs/http/javadsl/server/directives/BasicDirectivesExamplesTest.java#toStrictEntity
|
||||
Loading…
Add table
Add a link
Reference in a new issue