Skip to content

Conversation

denysvitali
Copy link
Contributor

  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.

This adds an userAgent configuration field as with other HTTP libraries. This allows more flexibility in migrating from dart:io's HTTP to OkHttp.

Copy link

PR Health

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 ✔️

This check can be disabled by tagging the PR with skip-breaking-check.

Changelog Entry
Package Changed Files
package:ok_http pkgs/ok_http/lib/src/ok_http_client.dart

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.

Coverage ⚠️
File Coverage
pkgs/ok_http/lib/src/ok_http_client.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.

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 $Certificate$NullableType jni/bindings.dart::Certificate::nullableType
ok_http $Certificate$Type jni/bindings.dart::Certificate::type
ok_http PublicKey jni/bindings.dart::Certificate::verify::publicKey
jni/bindings.dart::$PublicKey$NullableType
jni/bindings.dart::$PublicKey$NullableType::nullableType
jni/bindings.dart::$PublicKey$Type
jni/bindings.dart::$PublicKey$Type::nullableType
jni/bindings.dart::Certificate::verify$1::publicKey
jni/bindings.dart::Certificate::verify$2::publicKey
jni/bindings.dart::Certificate::getPublicKey
jni/bindings.dart::X509Certificate::verify2::publicKey
ok_http $PublicKey$NullableType jni/bindings.dart::PublicKey::nullableType
ok_http $PublicKey$Type jni/bindings.dart::PublicKey::type
ok_http $PublicKey jni/bindings.dart::PublicKey::implementIn::$impl
jni/bindings.dart::PublicKey::implement::$impl
ok_http $X509Certificate$NullableType jni/bindings.dart::X509Certificate::nullableType
ok_http $X509Certificate$Type jni/bindings.dart::X509Certificate::type
ok_http $PrivateKey$NullableType jni/bindings.dart::PrivateKey::nullableType
ok_http $PrivateKey$Type jni/bindings.dart::PrivateKey::type
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.

License Headers ✔️
// Copyright (c) 2025, 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

This check can be disabled by tagging the PR with skip-license-check.

Copy link
Collaborator

@brianquinlan brianquinlan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/// This should only be used in a testing environment.
final bool validateServerCertificates;

final String? userAgent;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add dart doc for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants