2015-05-11 23:05:18 +02:00
|
|
|
.. _-extractHost-:
|
|
|
|
|
|
|
|
|
|
extractHost
|
|
|
|
|
===========
|
|
|
|
|
|
|
|
|
|
Signature
|
|
|
|
|
---------
|
|
|
|
|
|
2015-06-19 15:35:24 +02:00
|
|
|
.. includecode2:: /../../akka-http/src/main/scala/akka/http/scaladsl/server/directives/HostDirectives.scala
|
2015-05-11 23:05:18 +02:00
|
|
|
:snippet: extractHost
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description
|
|
|
|
|
-----------
|
|
|
|
|
|
2015-10-09 15:19:36 +02:00
|
|
|
Extract the hostname part of the ``Host`` request header and expose it as a ``String`` extraction to its inner route.
|
2015-05-11 23:05:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
Example
|
|
|
|
|
-------
|
|
|
|
|
|
2015-05-21 17:34:46 +02:00
|
|
|
.. includecode2:: ../../../../code/docs/http/scaladsl/server/directives/HostDirectivesExamplesSpec.scala
|
|
|
|
|
:snippet: extractHost
|