Commit 91dfd35
authored
Adopt the new shared HTTP client (#13)
Adopt the new shared HTTP client
### Motivation
Now that SwiftNIO/AsyncHTTPClient have a singleton variant of the `EventLoopGroup`, which allows creating an `HTTPClient` without any argument, let's simplify the initializer of the transport to take advantage of it - bringing it in line with the URLSession transport.
### Modifications
Default the HTTPClient to a new one with a default event loop group, and remove the mandatory shutdown call.
### Result
Adopters can more easily create the AHC transport.
### Test Plan
N/A
Reviewed by: dnadoba, glbrntt
Builds:
✔︎ pull request validation (5.8) - Build finished.
✔︎ pull request validation (5.9) - Build finished.
✔︎ pull request validation (nightly) - Build finished.
✔︎ pull request validation (soundness) - Build finished.
#131 parent 95bb2f8 commit 91dfd35
File tree
2 files changed
+11
-19
lines changed- Sources/OpenAPIAsyncHTTPClient
2 files changed
+11
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
Lines changed: 9 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 35 | + | |
50 | 36 | | |
51 | 37 | | |
52 | 38 | | |
| |||
68 | 54 | | |
69 | 55 | | |
70 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
71 | 63 | | |
72 | 64 | | |
73 | 65 | | |
| |||
83 | 75 | | |
84 | 76 | | |
85 | 77 | | |
86 | | - | |
| 78 | + | |
87 | 79 | | |
88 | 80 | | |
89 | 81 | | |
| |||
0 commit comments