Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an section explaining the benefits of using package:ok_http. #1252

Merged
merged 2 commits into from
Jul 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions pkgs/ok_http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@
An Android Flutter plugin that provides access to the
[OkHttp][] HTTP client.

## Why use `package:ok_http`?

### 👍 Increased compatibility and reduced disk profile

`package:ok_http` is smaller and works on more devices than other packages.

This size of the [example application][] APK file using different packages:

| Package | APK Size (MiB) |
|-|-|
| **`ok_http`** | **20.3** |
| [`cronet_http`](https://pub.dev/packages/cronet_http) [^1] | 20.6 |
| [`cronet_http` (embedded)](https://pub.dev/packages/cronet_http#use-embedded-cronet) [^2] | 34.4 |
| `dart:io` [^3] | 20.4 |

[^1]: Requires [Google Play Services][], which are not available on all devices.
[^2]: Embeds the Cronet HTTP library.
[^3]: Accessed through [`IOClient`](https://pub.dev/documentation/http/latest/io_client/IOClient-class.html).

## Status: experimental

**NOTE**: This package is currently experimental and published under the
Expand All @@ -19,4 +38,6 @@ Your feedback is valuable and will help us evolve this package. For general
feedback, suggestions, and comments, please file an issue in the
[bug tracker](https://github.com/dart-lang/http/issues).

[example application]: https://github.com/dart-lang/http/tree/master/pkgs/flutter_http_example
[OkHttp]: https://square.github.io/okhttp/
[Google Play Services]: https://developers.google.com/android/guides/overview
Loading