.. _-mapResponse-: mapResponse =========== Signature --------- .. includecode2:: /../../akka-http/src/main/scala/akka/http/scaladsl/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 complete responses. See also :ref:`-mapResponseHeaders-` or :ref:`-mapResponseEntity-` for more specialized variants and :ref:`Response Transforming Directives` for similar directives. Example ------- .. includecode2:: ../../../../code/docs/http/scaladsl/server/directives/BasicDirectivesExamplesSpec.scala :snippet: 0mapResponse