2015-05-11 23:05:18 +02:00
|
|
|
.. _-extractScheme-:
|
|
|
|
|
|
|
|
|
|
extractScheme
|
|
|
|
|
=============
|
|
|
|
|
|
|
|
|
|
Extracts the value of the request Uri scheme.
|
|
|
|
|
|
|
|
|
|
Signature
|
|
|
|
|
---------
|
|
|
|
|
|
2015-06-19 15:35:24 +02:00
|
|
|
.. includecode2:: /../../akka-http/src/main/scala/akka/http/scaladsl/server/directives/SchemeDirectives.scala
|
2015-05-11 23:05:18 +02:00
|
|
|
:snippet: extractScheme
|
|
|
|
|
|
|
|
|
|
Description
|
|
|
|
|
-----------
|
|
|
|
|
|
|
|
|
|
The ``extractScheme`` directive can be used to determine the Uri scheme (i.e. "http", "https", etc.)
|
|
|
|
|
for an incoming request.
|
|
|
|
|
|
|
|
|
|
For rejecting a request if it doesn't match a specified scheme name, see the :ref:`-scheme-` directive.
|
|
|
|
|
|
|
|
|
|
Example
|
|
|
|
|
-------
|
|
|
|
|
|
2015-09-16 23:50:35 +02:00
|
|
|
.. includecode2:: ../../../../code/docs/http/scaladsl/server/directives/SchemeDirectivesExamplesSpec.scala
|
2015-05-11 23:05:18 +02:00
|
|
|
:snippet: example-1
|