Conversation
6808179 to
fc43a0b
Compare
PR Health
Coverage
|
| File | Coverage |
|---|---|
| pkgs/ok_http/example/integration_test/client_test.dart | 💔 Not covered |
| pkgs/ok_http/lib/src/jni/bindings.dart | 💔 Not covered |
| pkgs/ok_http/lib/src/ok_http_client.dart | 💔 Not covered |
| pkgs/ok_http/lib/src/ok_http_web_socket.dart | 💔 Not covered |
This check for test coverage is informational (issues shown here will not fail the PR).
This check can be disabled by tagging the PR with skip-coverage-check.
Breaking changes ✔️
| Package | Change | Current Version | New Version | Needed Version | Looking good? |
|---|---|---|---|---|---|
| ok_http | Non-Breaking | 0.1.0 | 0.1.1-wip | 0.1.1-wip | ✔️ |
This check can be disabled by tagging the PR with skip-breaking-check.
Unused Dependencies ⚠️
| Package | Status |
|---|---|
| ok_http | ❗ Show IssuesThese packages are used outside lib/ but are not dev_dependencies: |
For details on how to fix these, see dependency_validator.
This check can be disabled by tagging the PR with skip-unused-dependencies-check.
Changelog Entry ❗
| Package | Changed Files |
|---|---|
| package:ok_http | pkgs/ok_http/lib/src/jni/bindings.dart pkgs/ok_http/lib/src/ok_http_client.dart pkgs/ok_http/lib/src/ok_http_web_socket.dart pkgs/ok_http/pubspec.yaml |
Changes to files need to be accounted for in their respective changelogs.
This check can be disabled by tagging the PR with skip-changelog-check.
License Headers ✔️
// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
| Files |
|---|
| no missing headers |
All source files should start with a license header.
Unrelated files missing license headers
| Files |
|---|
| pkgs/http/example/main.dart |
| pkgs/http_multi_server/test/cert.dart |
This check can be disabled by tagging the PR with skip-license-check.
API leaks ⚠️
The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
| Package | Leaked API symbol | Leaking sources |
|---|---|---|
| ok_http | PublicKey | jni/bindings.dart::Certificate::getPublicKey jni/bindings.dart::PublicKey::nullableType jni/bindings.dart::PublicKey::type jni/bindings.dart::Certificate::verify::publicKey jni/bindings.dart::Certificate::verify$1::publicKey jni/bindings.dart::Certificate::verify$2::publicKey jni/bindings.dart::X509Certificate::verify2::publicKey |
| ok_http | $PublicKey | jni/bindings.dart::PublicKey::implementIn::$impl jni/bindings.dart::PublicKey::implement::$impl |
| ok_http | $PrivateKey | jni/bindings.dart::PrivateKey::implementIn::$impl jni/bindings.dart::PrivateKey::implement::$impl |
This check can be disabled by tagging the PR with skip-leaking-check.
regenerate bindings update client fix nullability change
handle abort
fc43a0b to
cbe2199
Compare
This PR allows creating a client from a JNI global reference of an existing OkHttpClient. In this way, one can share the same session across an app beyond a single isolate, which is both optimal for performance and centralizes configuration. This is notably much simpler to accomplish with ok_http than with cupertino_http.
I've tested these changes in my app and added it to the conformance test suite. I don't expect behavior to be different from a normal client given that the
sendimplementation is the same.Based on #1880, which should be merged first to clean up the diff.
Contribution guidelines:
dart format.Many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.
Note: The Dart team is trialing Gemini Code Assist. Don't take its comments as final Dart team feedback. Use the suggestions if they're helpful; otherwise, wait for a human reviewer.