Contributor
Anikate De

Creating an HTTP Client using Dart Bindings from OkHttp


Mentors
Brian Quinlan, Camille Simon
Organization
Dart
Technologies
dart, jni, FFI
Topics
interoperability, http, web sockets
A Flutter plugin that integrates the OkHttp package (https://square.github.io/okhttp/) using the Dart Bindings from the package:jnigen and implements the package:http's Client interface. Several APIs from the OkHttp package are used, to make asynchronous requests. This implementation passes the conformance tests in package:http_client_conformance_tests. This plugin is expected to be able to stream response bodies as well. The plugin will also implement the package:web_socket_channel's WebSocketChannel interface. This will provide several features requested by Dart Users: (a) Support for KeyStore PrivateKeys (#50669), (b) Support for the system proxy (#50434), (c) Support for user-installed certificates (#50435). The plugin should be available as a standalone package at https://pub.dev/. It should be almost identical to cronet_http and java_http packages, and provide seamless integration in all Flutter Projects. This package is also expected to broaden its functionality to other platforms.