aboutsummaryrefslogtreecommitdiff
path: root/docs/conf/proxy.rst
blob: bcb1b3a1889ccec0500b24c5abb62f03a63bcb31 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Proxy support
=============

sttp library by default checks for your System proxy properties (`docs <https://docs.oracle.com/javase/8/docs/api/java/net/doc-files/net-properties.html>`_):

Following settings are checked:

1. ``socksProxyHost`` and ``socksProxyPort`` *(default: 1080)*
2. ``http.proxyHost`` and ``http.proxyPort`` *(default: 80)*

Settings are loaded **in given order** and the **first existing value** is being used.

Otherwise, proxy values can be specified manually when creating a backend::
 
  import com.softwaremill.sttp._
  
  implicit val backend = HttpURLConnectionBackend(
    options = SttpBackendOptions.httpProxy("some.host", 8080))
  
  sttp
    .get(uri"...")
    .send() // uses the proxy