Commit 7b96b1d
authored
Adopt AHC's .shared singleton as the default Client (#39)
### Motivation
As a convenience when you don't need to create a custom AHC Client
instance, we provide a singleton client as the default. AHC added their
own `Client.shared` singleton, so let's adopt that and remove the
transport's internal singleton, which was used for the same purpose.
### Modifications
- Replaced the tranport's internal singleton with the AHC-provided one.
- Use Int64 directly and skip conversions now that AHC also uses Int64
for the body byte size.
### Result
- No internal singleton is created now, possibly avoiding having two AHC
singletons in a given process.
- Fixed a warning around Int/Int64 conversion.
### Test Plan
Unit tests still pass.1 parent abfe558 commit 7b96b1d
File tree
3 files changed
+15
-15
lines changed- Sources/OpenAPIAsyncHTTPClient
- docker
3 files changed
+15
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
Lines changed: 13 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | 65 | | |
74 | 66 | | |
75 | 67 | | |
76 | 68 | | |
77 | 69 | | |
78 | 70 | | |
79 | | - | |
80 | 71 | | |
81 | | - | |
82 | | - | |
| 72 | + | |
| 73 | + | |
83 | 74 | | |
84 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
177 | | - | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
0 commit comments