File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ This library provides the following:
7
7
3 . Streaming body download
8
8
4 . TLS support
9
9
5 . Cookie parsing (but not storage)
10
+ 6 . Automatic HTTP/2 over HTTPS (since version 1.7.0)
10
11
11
12
---
12
13
@@ -216,7 +217,7 @@ httpClient.execute(
216
217
).whenComplete (... )
217
218
```
218
219
219
- Direct URLs can easily be contructed to be executed in other scenarios:
220
+ Direct URLs can easily be constructed to be executed in other scenarios:
220
221
``` swift
221
222
let socketPathBasedURL = URL (
222
223
httpURLWithSocketPath : " /tmp/myServer.socket" ,
@@ -228,6 +229,17 @@ let secureSocketPathBasedURL = URL(
228
229
)
229
230
```
230
231
232
+ ### Disabling HTTP/2
233
+ The exclusive use of HTTP/1 is possible by setting ` httpVersion ` to ` .http1Only ` on ` HTTPClient.Configuration ` :
234
+ ``` swift
235
+ var configuration = HTTPClient.Configuration ()
236
+ configuration.httpVersion = .http1Only
237
+ let client = HTTPClient (
238
+ eventLoopGroupProvider : .createNew ,
239
+ configuration : configuration
240
+ )
241
+ ```
242
+
231
243
## Security
232
244
233
245
Please have a look at [ SECURITY.md] ( SECURITY.md ) for AsyncHTTPClient's security process.
You can’t perform that action at this time.
0 commit comments