=doc #18657 Doc host and path directives

* also including docs of RequestVals.matchAndExtractHost
  and RequestVals.matchAndExtractHost
* and add Host.create factory methods
* add missing HttpRequest PATCH and OPTIONS
* change to val in matchAndExtractHost for
  fail fast exception
This commit is contained in:
Patrik Nordwall 2015-10-07 12:07:26 +02:00
parent 5753cd6074
commit 3081893bfd
20 changed files with 519 additions and 2 deletions

View file

@ -0,0 +1,17 @@
.. _-post-java-:
post
====
Matches requests with HTTP method ``POST``.
This directive filters the incoming request by its HTTP method. Only requests with
method ``POST`` are passed on to the inner route. All others are rejected with a
``MethodRejection``, which is translated into a ``405 Method Not Allowed`` response
by the default ``RejectionHandler``.
Example
-------
.. includecode:: ../../../../code/docs/http/javadsl/server/directives/MethodDirectivesExamplesTest.java#post