From 6e109a964383bfe5e2be04f65fa7cc1356a97cbe Mon Sep 17 00:00:00 2001 From: adamw Date: Tue, 17 Oct 2017 17:28:50 +0200 Subject: More docs --- docs/index.rst | 77 ++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 34 deletions(-) (limited to 'docs/index.rst') diff --git a/docs/index.rst b/docs/index.rst index 0550cd7..d569a11 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,12 +1,11 @@ sttp: the Scala HTTP client you always wanted! ============================================== -`sttp `_ is an open-source library which provides a clean, programmer-friendly API to define HTTP requests and execute them using one of the wrapped backends, such as `akka-http `_, `async-http-client `_ or `OkHttp `_. +Welcome! -First impressions ------------------ +`sttp `_ is an open-source library which provides a clean, programmer-friendly API to define HTTP requests and execute them using one of the wrapped backends, such as `akka-http `_, `async-http-client `_ or `OkHttp `_. -.. code-block:: scala +Here's a very quick example of sttp in action:: import com.softwaremill.sttp._ @@ -25,38 +24,42 @@ First impressions // response.unsafeBody: by default read into a String println(response.unsafeBody) - - -Quickstart with Ammonite ------------------------- - -If you are an `Ammonite `_ user, you can quickly start -experimenting with sttp by copy-pasting the following:: - - import $ivy.`com.softwaremill.sttp::core:0.0.20` - import com.softwaremill.sttp._ - implicit val backend = HttpURLConnectionBackend() - sttp.get(uri"http://httpbin.org/ip").send() - -Adding sttp to your project ---------------------------- -The basic dependency which provides the default, synchornous backend is:: +For more details, explore the subjects below! - "com.softwaremill.sttp" %% "core" % "0.0.20" - -``sttp`` is available for Scala 2.11 and 2.12, and requires Java 7 if using an ``OkHttp`` based backend, or Java 8 otherwise. The core module has no transitive dependencies. +.. toctree:: + :maxdepth: 2 + :caption: Getting started -If you'd like to use an alternate backend, [see below](#supported-backends) for additional instructions. + quickstart + goals + community .. toctree:: :maxdepth: 2 + :caption: Request definition - goals requests/basics requests/uri - requests/defaults + requests/headers + requests/cookies + requests/authentication + requests/body + requests/multipart + requests/streaming requests/type + +.. toctree:: + :maxdepth: 2 + :caption: Responses + + responses/basics + responses/body + +.. toctree:: + :maxdepth: 2 + :caption: Backends + backends/summary backends/start_stop backends/httpurlconnection @@ -64,17 +67,23 @@ If you'd like to use an alternate backend, [see below](#supported-backends) for backends/asynchttpclient backends/okhttp backends/custom + backends/testing + backends/tagging + +.. toctree:: + :maxdepth: 2 + :caption: Configuration + conf/timeouts conf/ssl - conf/proxy + conf/proxy + conf/redirects + +.. toctree:: + :maxdepth: 2 + :caption: More information + json - testing other credits -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` -- cgit v1.2.3