Made imports in docs snippets more complete and a few minor improvements
This commit is contained in:
parent
87a9196088
commit
bf76d6c389
15 changed files with 197 additions and 161 deletions
|
|
@ -118,7 +118,7 @@ If, however, your marshaller also needs to set things like the response status c
|
|||
or any headers then a ``ToEntityMarshaller[T]`` won't work. You'll need to fall down to providing a
|
||||
``ToResponseMarshaller[T]`` or a ``ToRequestMarshaller[T]`` directly.
|
||||
|
||||
For writing you own marshallers you won't have to "manually" implement the ``Marshaller`` trait directly.
|
||||
For writing your own marshallers you won't have to "manually" implement the ``Marshaller`` trait directly.
|
||||
Rather, it should be possible to use one of the convenience construction helpers defined on the ``Marshaller``
|
||||
companion:
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ Custom Unmarshallers
|
|||
|
||||
Akka HTTP gives you a few convenience tools for constructing unmarshallers for your own types.
|
||||
Usually you won't have to "manually" implement the ``Unmarshaller`` trait directly.
|
||||
Rather, it should be possible to use one of the convenience construction helpers defined on the ``Marshaller``
|
||||
Rather, it should be possible to use one of the convenience construction helpers defined on the ``Unmarshaller``
|
||||
companion:
|
||||
|
||||
.. includecode2:: /../../akka-http/src/main/scala/akka/http/scaladsl/unmarshalling/Unmarshaller.scala
|
||||
|
|
|
|||
|
|
@ -25,11 +25,14 @@ Akka HTTP was designed specifically as “not-a-framework”, not because we don
|
|||
|
||||
Using Akka HTTP
|
||||
---------------
|
||||
Akka HTTP is provided in separate jar files, to use it make sure to include the following dependencies::
|
||||
Akka HTTP is provided in a separate jar file, to use it make sure to include the following dependency::
|
||||
|
||||
"com.typesafe.akka" %% "akka-http-core" % "@version@" @crossString@
|
||||
"com.typesafe.akka" %% "akka-http-experimental" % "@version@" @crossString@
|
||||
|
||||
Mind that ``akka-http`` comes in two modules: ``akka-http-experimental`` and ``akka-http-core``. Because ``akka-http-experimental``
|
||||
depends on ``akka-http-core`` you don't need to bring the latter explicitly. Still you may need to this in case you rely
|
||||
solely on low-level API.
|
||||
|
||||
|
||||
Routing DSL for HTTP servers
|
||||
----------------------------
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ Bind failures
|
|||
^^^^^^^^^^^^^
|
||||
For example the server might be unable to bind to the given port. For example when the port
|
||||
is already taken by another application, or if the port is privileged (i.e. only usable by ``root``).
|
||||
In this case the "binding future" will fail immediatly, and we can react to if by listening on the Future's completion:
|
||||
In this case the "binding future" will fail immediately, and we can react to if by listening on the Future's completion:
|
||||
|
||||
.. includecode2:: ../../code/docs/http/scaladsl/HttpServerExampleSpec.scala
|
||||
:snippet: binding-failure-high-level-example
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue