pekko/akka-docs/rst/java/http/routing-dsl/directives/host-directives/extractHost.rst

14 lines
315 B
ReStructuredText
Raw Normal View History

.. _-extractHost-java-:
RequestVals.host
================
Extract the hostname part of the ``Host`` request header and expose it as a ``String`` extraction
to its inner route.
Example
-------
.. includecode:: ../../../../code/docs/http/javadsl/server/directives/HostDirectivesExamplesTest.java#extractHostname