.. _-mapResponse-: mapResponse =============== Changes the response that was generated by the inner route. Signature --------- .. includecode2:: /../../akka-http/src/main/scala/akka/http/server/directives/BasicDirectives.scala :snippet: mapResponse Description ----------- The ``mapResponse`` directive is used as a building block for :ref:`Custom Directives` to transform a response that was generated by the inner route. This directive transforms only complete responses. Use :ref:`-mapHttpResponsePart-`, instead, to transform parts of chunked responses as well. See :ref:`Response Transforming Directives` for similar directives. Example ------- .. includecode2:: ../../../code/docs/http/server/directives/BasicDirectivesExamplesSpec.scala :snippet: 0mapResponse