Merge pull request #19004 from ktoso/wip-jsonexamples-ktoso
=doc,htc better example docs on mapping error response to empty JSON …
This commit is contained in:
commit
35b690371f
2 changed files with 52 additions and 2 deletions
|
|
@ -18,8 +18,14 @@ was generated by the inner route. This directive transforms complete responses.
|
|||
See also :ref:`-mapResponseHeaders-` or :ref:`-mapResponseEntity-` for more specialized variants and
|
||||
:ref:`Response Transforming Directives` for similar directives.
|
||||
|
||||
Example
|
||||
-------
|
||||
Example: Override status
|
||||
------------------------
|
||||
|
||||
.. includecode2:: ../../../../code/docs/http/scaladsl/server/directives/BasicDirectivesExamplesSpec.scala
|
||||
:snippet: 0mapResponse
|
||||
|
||||
Example: Default to empty JSON response on errors
|
||||
-------------------------------------------------
|
||||
|
||||
.. includecode2:: ../../../../code/docs/http/scaladsl/server/directives/BasicDirectivesExamplesSpec.scala
|
||||
:snippet: 1mapResponse-advanced
|
||||
Loading…
Add table
Add a link
Reference in a new issue