Skip to content

Commit eb87a60

Browse files
authored
pkgs/ok_http: Close the client (override close() from BaseClient) (#1224)
1 parent 9f022d2 commit eb87a60

File tree

4 files changed

+1349
-9
lines changed

4 files changed

+1349
-9
lines changed

pkgs/ok_http/example/integration_test/client_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ Future<void> testConformance() async {
1919
testResponseBody(OkHttpClient(), canStreamResponseBody: false);
2020
testRequestHeaders(OkHttpClient());
2121
testRequestMethods(OkHttpClient(), preservesMethodCase: true);
22+
testResponseHeaders(OkHttpClient(), supportsFoldedHeaders: false);
2223
testResponseStatusLine(OkHttpClient());
2324
testCompressedResponseBody(OkHttpClient());
2425
testServerErrors(OkHttpClient());
26+
testClose(OkHttpClient.new);
2527
testIsolate(OkHttpClient.new);
2628
testResponseCookies(OkHttpClient(), canReceiveSetCookieHeaders: true);
2729
});

pkgs/ok_http/jnigen.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ classes:
2323
- "okhttp3.Call"
2424
- "okhttp3.Headers"
2525
- "okhttp3.Callback"
26+
- "okhttp3.ConnectionPool"
27+
- "okhttp3.Dispatcher"
28+
- "okhttp3.Cache"
2629

2730
# Exclude the deprecated methods listed below
2831
# They cause syntax errors during the `dart format` step of JNIGen.
@@ -76,6 +79,8 @@ exclude:
7679
- 'okhttp3.OkHttpClient\$Builder#-addNetworkInterceptor'
7780
- 'okhttp3.Headers\$Companion#-deprecated_of'
7881
- "okhttp3.Headers#-deprecated_size"
82+
- "okhttp3.Dispatcher#-deprecated_executorService"
83+
- "okhttp3.Cache#-deprecated_directory"
7984

8085
class_path:
8186
- "jar/okhttp-4.12.0.jar"

0 commit comments

Comments
 (0)