Commit 14d386b
fix: Switch DefaultHttpAdapter from OkHttp to HttpURLConnection
Replace OkHttp transport with java.net.HttpURLConnection; remove okhttp
and logging-interceptor compile dependencies. Preserve debug logging
behind RECURLY_INSECURE + RECURLY_DEBUG using System.out.println.
Fix 411 errors on POST/PUT with null body by sending Content-Length: 0,
matching OkHttp prior behavior. Add contract tests for this case.
Update the implementation guide to use OkHttp as the example adapter
instead of java.net.http.HttpClient.
Co-Authored-By: Claude <noreply@anthropic.com>
feat: Add gzip response decompression to DefaultHttpAdapter
DefaultHttpAdapter now sets Accept-Encoding: gzip on outgoing requests
(unless the caller already set one) and transparently decompresses
gzip-encoded response and error bodies via GZIPInputStream, matching
the behavior OkHttp provided automatically before the HttpURLConnection
migration. content-encoding and content-length are stripped from the
returned headers once decompressed since they no longer describe the
decompressed body.
Co-Authored-By: Claude <noreply@anthropic.com>
fix: Exclude WireMock-dependent tests from testCompile on JDK 8
WireMock 3.x ships Java 11 class files, which javac on a JDK 8
toolchain cannot read from the classpath regardless of source/target
level. @DisabledOnJre(JRE.JAVA_8) only skips execution, not
compilation, so the Java 8 CI job was failing to build.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
fix: Update RequestOptions header tests for HttpAdapter migration
Rebase onto v3-v2021-02-25 merged in idempotency-key/custom-header
tests written against the old OkHttp-based BaseClient. Rewrite them
against the HttpAdapter mock so they compile and assert against the
headers map passed to httpAdapter.execute.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 9d33959 commit 14d386b
19 files changed
Lines changed: 828 additions & 230 deletions
File tree
- docs
- src
- main/java/com/recurly/v3
- http
- internal
- test/java/com/recurly/v3
- fixtures
- http
- internal
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | | - | |
51 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
| |||
77 | 76 | | |
78 | 77 | | |
79 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| |||
159 | 161 | | |
160 | 162 | | |
161 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
162 | 170 | | |
163 | 171 | | |
164 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
165 | 183 | | |
166 | 184 | | |
167 | 185 | | |
168 | 186 | | |
169 | 187 | | |
170 | 188 | | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | 189 | | |
177 | 190 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
183 | 206 | | |
184 | 207 | | |
185 | 208 | | |
186 | 209 | | |
187 | 210 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
| 211 | + | |
193 | 212 | | |
194 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
195 | 230 | | |
196 | | - | |
197 | | - | |
198 | | - | |
| 231 | + | |
| 232 | + | |
199 | 233 | | |
200 | 234 | | |
201 | | - | |
202 | | - | |
203 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
204 | 239 | | |
205 | | - | |
206 | | - | |
| 240 | + | |
| 241 | + | |
207 | 242 | | |
208 | | - | |
209 | | - | |
210 | | - | |
| 243 | + | |
211 | 244 | | |
212 | 245 | | |
213 | 246 | | |
| |||
274 | 307 | | |
275 | 308 | | |
276 | 309 | | |
277 | | - | |
| 310 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
| |||
87 | 86 | | |
88 | 87 | | |
89 | 88 | | |
90 | | - | |
91 | | - | |
| 89 | + | |
92 | 90 | | |
93 | 91 | | |
94 | 92 | | |
| |||
156 | 154 | | |
157 | 155 | | |
158 | 156 | | |
| 157 | + | |
159 | 158 | | |
160 | 159 | | |
161 | 160 | | |
| |||
234 | 233 | | |
235 | 234 | | |
236 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
237 | 269 | | |
238 | 270 | | |
239 | 271 | | |
240 | 272 | | |
241 | 273 | | |
242 | 274 | | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | 275 | | |
254 | 276 | | |
255 | 277 | | |
| |||
0 commit comments