aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Warski <adam@warski.org>2018-04-15 21:21:17 +0200
committerGitHub <noreply@github.com>2018-04-15 21:21:17 +0200
commit5bbfcc8da651d4f95513e0c1d2522ab84845fe6c (patch)
tree6bfe5cfe4a14d78990c0a140078748e6aa6f7510
parent2ea2c045b10f8ee6128b72db2e9bee4ec4567b6b (diff)
parent2717428257e55871d29f84de0f55b59ac3122b24 (diff)
downloadsttp-5bbfcc8da651d4f95513e0c1d2522ab84845fe6c.tar.gz
sttp-5bbfcc8da651d4f95513e0c1d2522ab84845fe6c.tar.bz2
sttp-5bbfcc8da651d4f95513e0c1d2522ab84845fe6c.zip
Merge pull request #77 from jsw/patch-3
fix typo
-rw-r--r--docs/backends/custom.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/backends/custom.rst b/docs/backends/custom.rst
index cca6a72..17571e1 100644
--- a/docs/backends/custom.rst
+++ b/docs/backends/custom.rst
@@ -102,7 +102,7 @@ Handling retries is a complex problem when it comes to HTTP requests. When is a
* only idempotent HTTP methods (such as ``GET``) could potentially be retried
* some HTTP status codes might also be retryable (e.g. ``500 Internal Server Error`` or ``503 Service Unavailable``)
-In some cases it's possible to implement a generic retry mechanism; such a mechanism should take into account logging, metrics, limiting the number of retries and a backoff mechanism. These mechanisms could be quite simple, or involve e.g. retry budges (see `Finagle's <https://twitter.github.io/finagle/guide/Clients.html#retries>`_ documentation on retries). In sttp, it's possible to recover from errors using the ``responseMonad``. A starting point for a retrying backend could be::
+In some cases it's possible to implement a generic retry mechanism; such a mechanism should take into account logging, metrics, limiting the number of retries and a backoff mechanism. These mechanisms could be quite simple, or involve e.g. retry budgets (see `Finagle's <https://twitter.github.io/finagle/guide/Clients.html#retries>`_ documentation on retries). In sttp, it's possible to recover from errors using the ``responseMonad``. A starting point for a retrying backend could be::
import com.softwaremill.sttp.{MonadError, Request, Response, SttpBackend}
@@ -137,4 +137,4 @@ In some cases it's possible to implement a generic retry mechanism; such a mecha
override def responseMonad: MonadError[R] = delegate.responseMonad
}
-Note that some backends also have built-in retry mechanisms, e.g. `akka-http <https://doc.akka.io/docs/akka-http/current/scala/http/client-side/host-level.html#retrying-a-request>`_ or `OkHttp <http://square.github.io/okhttp>`_ (see the builder's ``retryOnConnectionFailure`` method). \ No newline at end of file
+Note that some backends also have built-in retry mechanisms, e.g. `akka-http <https://doc.akka.io/docs/akka-http/current/scala/http/client-side/host-level.html#retrying-a-request>`_ or `OkHttp <http://square.github.io/okhttp>`_ (see the builder's ``retryOnConnectionFailure`` method).