aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md20
1 files changed, 18 insertions, 2 deletions
diff --git a/README.md b/README.md
index 2429332..f998283 100644
--- a/README.md
+++ b/README.md
@@ -489,8 +489,9 @@ How to use:
import com.softwaremill.sttp._
import scala.concurrent.duration._
-// all backends provide a constructor that allows users to specify connection timeout
-implicit val backend = HttpURLConnectionBackend(connectionTimeout = 1.minute)
+// all backends provide a constructor that allows users to specify backend options
+implicit val backend = HttpURLConnectionBackend(
+ options = SttpBackendOptions.connectionTimeout(1.minute))
sttp
.get(uri"...")
@@ -498,6 +499,21 @@ sttp
.send()
```
+## Proxy
+
+A proxy can be specified when creating a backend:
+
+```scala
+import com.softwaremill.sttp._
+
+implicit val backend = HttpURLConnectionBackend(
+ options = SttpBackendOptions.httpProxy("some.host", 8080))
+
+sttp
+ .get(uri"...")
+ .send() // uses the proxy
+```
+
## SSL
SSL handling can be customized (or disabled) when creating a backend and is