From 77dfc7bfa577ab72d2325efcad813f6a165a4c36 Mon Sep 17 00:00:00 2001 From: adamw Date: Fri, 22 Sep 2017 16:26:56 +0200 Subject: #11, #35: SSL docs, more options for customizing delegated client calls --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 725f758..c12b4e7 100644 --- a/README.md +++ b/README.md @@ -498,6 +498,22 @@ sttp .send() ``` +## SSL + +SSL handling can be customized (or disabled) when creating a backend and is +backend-specific. + +Depending on the underlying backend's client, you can customize SSL settings +as follows: + +* `HttpUrlConnectionBackend`: when creating the backend, specify the `customizeConnection: HttpURLConnection => Unit` +parameter, and set the hostname verifier & SSL socket factory as required +* akka-http: when creating the backend, specify the `customHttpsContext: Option[HttpsConnectionContext]` +parameter. See [akka-http docs](http://doc.akka.io/docs/akka-http/current/scala/http/server-side/server-https-support.html) +* async-http-client: create a custom client and use the `setSSLContext` method +* OkHttp: create a custom client modifying the SSL settings as described +[on the wiki](https://github.com/square/okhttp/wiki/HTTPS) + ## Notes * the encoding for `String`s defaults to `utf-8`. -- cgit v1.2.3