pekko/akka-docs-dev/rst/scala/http/routing-dsl/directives/scheme-directives/extractScheme.rst
Konrad Malawski 87f4447b23 =doc #18104 fixes typo which made includecode2 not work in many places
Note that some of the files don't exist, fixing this very soon.
2015-09-16 23:50:35 +02:00

26 lines
661 B
ReStructuredText

.. _-extractScheme-:
extractScheme
=============
Extracts the value of the request Uri scheme.
Signature
---------
.. includecode2:: /../../akka-http/src/main/scala/akka/http/scaladsl/server/directives/SchemeDirectives.scala
: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
-------
.. includecode2:: ../../../../code/docs/http/scaladsl/server/directives/SchemeDirectivesExamplesSpec.scala
:snippet: example-1