diff options
author | Paweł Stawicki <pawelstawicki@gmail.com> | 2017-10-25 10:40:04 +0200 |
---|---|---|
committer | Paweł Stawicki <pawelstawicki@gmail.com> | 2017-10-25 10:40:04 +0200 |
commit | 6aa97fad45999ee95fd42a3c726106b2031bce33 (patch) | |
tree | 99e73e32341eb3d0f701fbe85b4d8073152f352e /docs/index.rst | |
parent | 4d010738c7b39b6a3e0844c6831283842d3f220d (diff) | |
parent | 46318ba2c350a99dcb85015b7a71a5bf70fe854b (diff) | |
download | sttp-6aa97fad45999ee95fd42a3c726106b2031bce33.tar.gz sttp-6aa97fad45999ee95fd42a3c726106b2031bce33.tar.bz2 sttp-6aa97fad45999ee95fd42a3c726106b2031bce33.zip |
Merge branch 'master' into stub-match-partial
Diffstat (limited to 'docs/index.rst')
-rw-r--r-- | docs/index.rst | 76 |
1 files changed, 42 insertions, 34 deletions
diff --git a/docs/index.rst b/docs/index.rst index 0550cd7..e030323 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,12 +1,11 @@ sttp: the Scala HTTP client you always wanted! ============================================== -`sttp <https://github.com/softwaremill/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 <https://doc.akka.io/docs/akka-http/current/scala/http/>`_, `async-http-client <https://github.com/AsyncHttpClient/async-http-client>`_ or `OkHttp <http://square.github.io/okhttp/>`_. +Welcome! -First impressions ------------------ +`sttp <https://github.com/softwaremill/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 <https://doc.akka.io/docs/akka-http/current/scala/http/>`_, `async-http-client <https://github.com/AsyncHttpClient/async-http-client>`_ or `OkHttp <http://square.github.io/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 <http://ammonite.io>`_ 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,22 @@ If you'd like to use an alternate backend, [see below](#supported-backends) for backends/asynchttpclient backends/okhttp backends/custom + backends/testing + +.. 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` |