Skip to content

Commit b09833e

Browse files
authored
Fix formatting of OkHttp client example in README (#86)
Updated code block formatting for OkHttp client example.
1 parent 0918779 commit b09833e

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,22 @@ or [submit a PR](https://github.com/bitfireAT/cert4android/pulls) over Github.
7373
7474
Example of initializing an okhttp client:
7575
76-
```kotlin
77-
val keyManager = ...
78-
CustomCertManager(...).use { trustManager ->
79-
val sslContext = SSLContext.getInstance("TLS")
80-
sslContext.init(
81-
if (keyManager != null) arrayOf(keyManager) else null,
82-
arrayOf(trustManager),
83-
null
84-
)
85-
val builder = OkHttpClient.Builder()
86-
builder.sslSocketFactory(sslContext.socketFactory, trustManager)
87-
.hostnameVerifier(hostnameVerifier)
88-
val httpClient = builder.build()
89-
// use httpClient
90-
}
91-
```
76+
```kotlin
77+
val keyManager = ...
78+
CustomCertManager(...).use { trustManager ->
79+
val sslContext = SSLContext.getInstance("TLS")
80+
sslContext.init(
81+
if (keyManager != null) arrayOf(keyManager) else null,
82+
arrayOf(trustManager),
83+
null
84+
)
85+
val builder = OkHttpClient.Builder()
86+
builder.sslSocketFactory(sslContext.socketFactory, trustManager)
87+
.hostnameVerifier(hostnameVerifier)
88+
val httpClient = builder.build()
89+
// use httpClient
90+
}
91+
```
9292

9393
You can overwrite resources when you want, just have a look at the `res/strings`
9494
directory. Especially `certificate_notification_connection_security` and

0 commit comments

Comments
 (0)