16 lines
657 B
ReStructuredText
16 lines
657 B
ReStructuredText
|
|
.. _-optionalHeaderValueByName-java-:
|
||
|
|
|
||
|
|
optionalHeaderValueByName
|
||
|
|
=========================
|
||
|
|
|
||
|
|
Description
|
||
|
|
-----------
|
||
|
|
Optionally extracts the value of the HTTP request header with the given name.
|
||
|
|
|
||
|
|
The ``optionalHeaderValueByName`` directive is similar to the :ref:`-headerValueByName-java-` directive but always extracts
|
||
|
|
an ``Optional`` value instead of rejecting the request if no matching header could be found.
|
||
|
|
|
||
|
|
Example
|
||
|
|
-------
|
||
|
|
TODO: Example snippets for JavaDSL are subject to community contributions! Help us complete the docs, read more about it here: `write example snippets for Akka HTTP Java DSL #20466 <https://github.com/akka/akka/issues/20466>`_.
|