=doc move http documentation around and setup high-level documentation structure
This commit is contained in:
parent
b67688dd59
commit
6f11735765
15 changed files with 69 additions and 22 deletions
|
|
@ -8,4 +8,6 @@ Scala Documentation
|
|||
|
||||
experimental/index
|
||||
scala/stream
|
||||
scala/index-http
|
||||
scala/http-core/index
|
||||
scala/http/index
|
||||
scala/http-testkit/testkit
|
||||
|
|
|
|||
4
akka-docs-dev/rst/scala/http-core/client.rst
Normal file
4
akka-docs-dev/rst/scala/http-core/client.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Client API
|
||||
==========
|
||||
|
||||
(todo)
|
||||
4
akka-docs-dev/rst/scala/http-core/https.rst
Normal file
4
akka-docs-dev/rst/scala/http-core/https.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
HTTPS
|
||||
=====
|
||||
|
||||
(todo)
|
||||
10
akka-docs-dev/rst/scala/http-core/index.rst
Normal file
10
akka-docs-dev/rst/scala/http-core/index.rst
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
Low-level HTTP API
|
||||
==================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
model
|
||||
server
|
||||
client
|
||||
https
|
||||
|
|
@ -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
|
||||
|
|
@ -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``
|
||||
2
akka-docs-dev/rst/scala/http-testkit/testkit.rst
Normal file
2
akka-docs-dev/rst/scala/http-testkit/testkit.rst
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
HTTP Testkit
|
||||
============
|
||||
4
akka-docs-dev/rst/scala/http/custom-directives.rst
Normal file
4
akka-docs-dev/rst/scala/http/custom-directives.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Custom Directives
|
||||
=================
|
||||
|
||||
(todo)
|
||||
14
akka-docs-dev/rst/scala/http/index.rst
Normal file
14
akka-docs-dev/rst/scala/http/index.rst
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
High-level HTTP API
|
||||
===================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
quick-start
|
||||
routing
|
||||
marshalling
|
||||
custom-directives
|
||||
predefined-directives-alphabetically
|
||||
predefined-directives-by-trait
|
||||
|
||||
|
||||
4
akka-docs-dev/rst/scala/http/marshalling.rst
Normal file
4
akka-docs-dev/rst/scala/http/marshalling.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Marshalling
|
||||
===========
|
||||
|
||||
(todo)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
Predefined Directives (alphabetically)
|
||||
======================================
|
||||
|
||||
(todo)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
Predefined Directives (by trait)
|
||||
================================
|
||||
|
||||
(todo)
|
||||
4
akka-docs-dev/rst/scala/http/quick-start.rst
Normal file
4
akka-docs-dev/rst/scala/http/quick-start.rst
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Quick-Start
|
||||
===========
|
||||
|
||||
(todo)
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
.. _http-routing-scala:
|
||||
|
||||
HTTP Routing
|
||||
============
|
||||
Routing DSL
|
||||
===========
|
||||
|
||||
(todo)
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
HTTP
|
||||
====
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
http-model
|
||||
http-core-server
|
||||
http-routing
|
||||
Loading…
Add table
Add a link
Reference in a new issue