=doc fix mentions of spray and link to magnet pattern

This commit is contained in:
Johannes Rudolph 2015-05-21 13:14:54 +02:00
parent 546936146b
commit fd85cac20f
19 changed files with 27 additions and 28 deletions

View file

@ -6,7 +6,7 @@ entity
Unmarshalls the request entity to the given type and passes it to its inner Route. An unmarshaller
returns an ``Either`` with ``Right(value)`` if successful or ``Left(exception)`` for a failure.
The ``entity`` method will either pass the ``value`` to the inner route or map the ``exception`` to a
``spray.routing.Rejection``.
``akka.http.scaladsl.server.Rejection``.
Signature
---------
@ -17,13 +17,13 @@ Signature
Description
-----------
The ``entity`` directive works in conjuction with ``as`` and ``spray.httpx.unmarshalling`` to
The ``entity`` directive works in conjuction with ``as`` and ``akka.http.scaladsl.unmarshalling`` to
convert some serialized "wire format" value into a higher-level object structure.
:ref:`The unmarshalling documentation <http-unmarshalling-scala>` explains this process in detail.
This directive simplifies extraction and error handling to the specified type from the request.
An unmarshaller will return a ``Left(exception)`` in the case of an error. This is converted to a
``spray.routing.Rejection`` within the ``entity`` directive. The following table lists how exceptions
``akka.http.scaladsl.server.Rejection`` within the ``entity`` directive. The following table lists how exceptions
are mapped to rejections:
========================== ============

View file

@ -21,15 +21,15 @@ The ``handleWith`` directive is used when you want to handle a route with a give
type A ⇒ B. ``handleWith`` will use both an in-scope unmarshaller to convert a request into
type A and an in-scope marshaller to convert type B into a response. This is helpful when your
core business logic resides in some other class or you want your business logic to be independent
of *Spray*. You can use ``handleWith`` to "hand off" processing to a given function without requiring
any spray-specific functionality.
of the REST interface written with akka-http. You can use ``handleWith`` to "hand off" processing
to a given function without requiring any akka-http-specific functionality.
``handleWith`` is similar to ``produce``. The main difference is ``handleWith`` automatically
calls ``complete`` when the function passed to ``handleWith`` returns. Using ``produce`` you
must explicity call the completion function passed from the ``produce`` function.
See :ref:`marshalling <http-marshalling-scala>` and :ref:`unmarshalling <http-unmarshalling-scala>` for guidance
on marshalling entities with Spray.
on marshalling entities with akka-http.
Examples
--------

View file

@ -3,7 +3,7 @@
Marshalling Directives
======================
Marshalling directives work in conjunction with ``spray.httpx.marshalling`` and ``spray.httpx.unmarshalling`` to convert
Marshalling directives work in conjunction with ``akka.http.scaladsl.marshalling`` and ``akka.http.scaladsl.unmarshalling`` to convert
a request entity to a specific type or a type to a response.
See :ref:`marshalling <http-marshalling-scala>` and :ref:`unmarshalling <http-unmarshalling-scala>` for specific