pekko/akka-docs-dev/rst/scala/http/routing-dsl/directives/respond-with-directives/overrideStatusCode.rst
Konrad Malawski 87f4447b23 =doc #18104 fixes typo which made includecode2 not work in many places
Note that some of the files don't exist, fixing this very soon.
2015-09-16 23:50:35 +02:00

27 lines
No EOL
710 B
ReStructuredText

.. _-overrideStatusCode-:
overrideStatusCode
==================
Overrides the status code of all responses coming back from its inner route with the given one.
Signature
---------
.. includecode2:: /../../akka-http/src/main/scala/akka/http/scaladsl/server/directives/RespondWithDirectives.scala
:snippet: overrideStatusCode
Description
-----------
This directive transforms ``HttpResponse`` and ``ChunkedResponseStart`` messages coming back from its inner route by
unconditionally overriding the status code with the given one.
Example
-------
.. includecode2:: ../../../../code/docs/http/scaladsl/server/directives/RespondWithDirectivesExamplesSpec.scala
:snippet: overrideStatusCode-examples