diff --git a/akka-docs-dev/rst/scala.rst b/akka-docs-dev/rst/scala.rst index 14662b661c..5cbce127bb 100644 --- a/akka-docs-dev/rst/scala.rst +++ b/akka-docs-dev/rst/scala.rst @@ -8,4 +8,6 @@ Scala Documentation experimental/index scala/stream - scala/index-http + scala/http-core/index + scala/http/index + scala/http-testkit/testkit diff --git a/akka-docs-dev/rst/scala/http-core/client.rst b/akka-docs-dev/rst/scala/http-core/client.rst new file mode 100644 index 0000000000..76cecbd12d --- /dev/null +++ b/akka-docs-dev/rst/scala/http-core/client.rst @@ -0,0 +1,4 @@ +Client API +========== + +(todo) \ No newline at end of file diff --git a/akka-docs-dev/rst/scala/http-core/https.rst b/akka-docs-dev/rst/scala/http-core/https.rst new file mode 100644 index 0000000000..ec501c0a62 --- /dev/null +++ b/akka-docs-dev/rst/scala/http-core/https.rst @@ -0,0 +1,4 @@ +HTTPS +===== + +(todo) \ No newline at end of file diff --git a/akka-docs-dev/rst/scala/http-core/index.rst b/akka-docs-dev/rst/scala/http-core/index.rst new file mode 100644 index 0000000000..96e764577a --- /dev/null +++ b/akka-docs-dev/rst/scala/http-core/index.rst @@ -0,0 +1,10 @@ +Low-level HTTP API +================== + +.. toctree:: + :maxdepth: 2 + + model + server + client + https diff --git a/akka-docs-dev/rst/scala/http-model.rst b/akka-docs-dev/rst/scala/http-core/model.rst similarity index 96% rename from akka-docs-dev/rst/scala/http-model.rst rename to akka-docs-dev/rst/scala/http-core/model.rst index 8ce420b6ce..b0b20aeee5 100644 --- a/akka-docs-dev/rst/scala/http-model.rst +++ b/akka-docs-dev/rst/scala/http-core/model.rst @@ -1,7 +1,7 @@ .. _http-model-scala: -HTTP Model -========== +Model +===== The akka HTTP model contains a mostly immutable, case-class based model of the major HTTP data structures, like HTTP requests, responses and common headers. It also includes a parser for the latter, which is able to construct @@ -13,7 +13,7 @@ Overview Since akka-http-core provides the central HTTP data structures you will find the following import in quite a few places around the code base (and probably your own code as well): -.. includecode:: code/docs/http/ModelSpec.scala +.. includecode:: ../code/docs/http/ModelSpec.scala :include: import-model This brings in scope all of the relevant things that are defined here and that you’ll want to work with, mainly: @@ -50,7 +50,7 @@ An ``HttpRequest`` consists of Here are some examples how to construct an ``HttpRequest``: -.. includecode:: code/docs/http/ModelSpec.scala +.. includecode:: ../code/docs/http/ModelSpec.scala :include: construct-request All parameters of ``HttpRequest`` have default values set, so e.g. ``headers`` don't need to be specified @@ -66,7 +66,7 @@ An ``HttpResponse`` consists of Here are some examples how to construct an ``HttpResponse``: -.. includecode:: code/docs/http/ModelSpec.scala +.. includecode:: ../code/docs/http/ModelSpec.scala :include: construct-response Aside from the simple ``HttpEntity`` constructors to create an entity from a fixed ``ByteString`` shown here, @@ -141,7 +141,7 @@ as a ``RawHeader``. See these examples of how to deal with headers: -.. includecode:: code/docs/http/ModelSpec.scala +.. includecode:: ../code/docs/http/ModelSpec.scala :include: headers Parsing / Rendering diff --git a/akka-docs-dev/rst/scala/http-core-server.rst b/akka-docs-dev/rst/scala/http-core/server.rst similarity index 98% rename from akka-docs-dev/rst/scala/http-core-server.rst rename to akka-docs-dev/rst/scala/http-core/server.rst index 37a7e1f2c1..af29624f33 100644 --- a/akka-docs-dev/rst/scala/http-core-server.rst +++ b/akka-docs-dev/rst/scala/http-core/server.rst @@ -1,7 +1,7 @@ .. _http-core-server-scala: -HTTP Server -=========== +Server API +========== The Akka HTTP server is an embedded, stream-based, fully asynchronous, low-overhead HTTP/1.1 server implemented on top of `Akka Streams`_. (todo: fix link) @@ -56,7 +56,7 @@ Starting and Stopping An Akka HTTP server is started by sending an ``Http.Bind`` command to the `akka.http.Http`_ extension: -.. includecode:: code/docs/http/HttpServerExampleSpec.scala +.. includecode:: ../code/docs/http/HttpServerExampleSpec.scala :include: bind-example With the ``Http.Bind`` command you specify the interface and port to bind to and register interest in handling incoming @@ -87,7 +87,7 @@ When a new connection has been accepted it will be published by the ``Http.Serve Handling requests in this model means connecting the ``requestProducer`` stream with an application-defined component that maps requests to responses which then feeds into the ``responseConsumer``: -.. includecode:: code/docs/http/HttpServerExampleSpec.scala +.. includecode:: ../code/docs/http/HttpServerExampleSpec.scala :include: full-server-example In this case, a request is handled by transforming the request stream with a function ``HttpRequest => HttpResponse`` diff --git a/akka-docs-dev/rst/scala/http-testkit/testkit.rst b/akka-docs-dev/rst/scala/http-testkit/testkit.rst new file mode 100644 index 0000000000..e1edcd0066 --- /dev/null +++ b/akka-docs-dev/rst/scala/http-testkit/testkit.rst @@ -0,0 +1,2 @@ +HTTP Testkit +============ \ No newline at end of file diff --git a/akka-docs-dev/rst/scala/http/custom-directives.rst b/akka-docs-dev/rst/scala/http/custom-directives.rst new file mode 100644 index 0000000000..e6ab3366b7 --- /dev/null +++ b/akka-docs-dev/rst/scala/http/custom-directives.rst @@ -0,0 +1,4 @@ +Custom Directives +================= + +(todo) \ No newline at end of file diff --git a/akka-docs-dev/rst/scala/http/index.rst b/akka-docs-dev/rst/scala/http/index.rst new file mode 100644 index 0000000000..d46a5c6dab --- /dev/null +++ b/akka-docs-dev/rst/scala/http/index.rst @@ -0,0 +1,14 @@ +High-level HTTP API +=================== + +.. toctree:: + :maxdepth: 2 + + quick-start + routing + marshalling + custom-directives + predefined-directives-alphabetically + predefined-directives-by-trait + + diff --git a/akka-docs-dev/rst/scala/http/marshalling.rst b/akka-docs-dev/rst/scala/http/marshalling.rst new file mode 100644 index 0000000000..b61045ba90 --- /dev/null +++ b/akka-docs-dev/rst/scala/http/marshalling.rst @@ -0,0 +1,4 @@ +Marshalling +=========== + +(todo) \ No newline at end of file diff --git a/akka-docs-dev/rst/scala/http/predefined-directives-alphabetically.rst b/akka-docs-dev/rst/scala/http/predefined-directives-alphabetically.rst new file mode 100644 index 0000000000..45627cfb53 --- /dev/null +++ b/akka-docs-dev/rst/scala/http/predefined-directives-alphabetically.rst @@ -0,0 +1,4 @@ +Predefined Directives (alphabetically) +====================================== + +(todo) \ No newline at end of file diff --git a/akka-docs-dev/rst/scala/http/predefined-directives-by-trait.rst b/akka-docs-dev/rst/scala/http/predefined-directives-by-trait.rst new file mode 100644 index 0000000000..9b03057e89 --- /dev/null +++ b/akka-docs-dev/rst/scala/http/predefined-directives-by-trait.rst @@ -0,0 +1,4 @@ +Predefined Directives (by trait) +================================ + +(todo) \ No newline at end of file diff --git a/akka-docs-dev/rst/scala/http/quick-start.rst b/akka-docs-dev/rst/scala/http/quick-start.rst new file mode 100644 index 0000000000..77449f4e0a --- /dev/null +++ b/akka-docs-dev/rst/scala/http/quick-start.rst @@ -0,0 +1,4 @@ +Quick-Start +=========== + +(todo) \ No newline at end of file diff --git a/akka-docs-dev/rst/scala/http-routing.rst b/akka-docs-dev/rst/scala/http/routing.rst similarity index 55% rename from akka-docs-dev/rst/scala/http-routing.rst rename to akka-docs-dev/rst/scala/http/routing.rst index 10b104caad..64754a3677 100644 --- a/akka-docs-dev/rst/scala/http-routing.rst +++ b/akka-docs-dev/rst/scala/http/routing.rst @@ -1,6 +1,6 @@ .. _http-routing-scala: -HTTP Routing -============ +Routing DSL +=========== (todo) \ No newline at end of file diff --git a/akka-docs-dev/rst/scala/index-http.rst b/akka-docs-dev/rst/scala/index-http.rst deleted file mode 100644 index 006333a89d..0000000000 --- a/akka-docs-dev/rst/scala/index-http.rst +++ /dev/null @@ -1,9 +0,0 @@ -HTTP -==== - -.. toctree:: - :maxdepth: 2 - - http-model - http-core-server - http-routing