ok_http2 1.0.0+1 copy "ok_http2: ^1.0.0+1" to clipboard
ok_http2: ^1.0.0+1 copied to clipboard

A package:http BaseClient that speaks HTTP/2, and can maintain connections.

ok_http2 #

ok_http2 pub package coverage pub license sdk-version

A package:http BaseClient that speaks HTTP/2, and can maintain connections between requests.

This can be dropped into any API that uses a BaseClient, so you can seamlessly start working with HTTP/2 right away.

It also can fallback to HTTP/1.1 automatically.

Installation #

In your pubspec.yaml:

dependencies:
  http2_client: ^1.0.0

Example #

Also see example/main.dart.

import 'dart:io';
import 'package:cli_repl/cli_repl.dart';
import 'package:http/http.dart';
import 'package:ok_http2/ok_http2.dart';

main() async {
  var client = Http2Client(maxOpenConnections: Platform.numberOfProcessors);
  var response = await client.get('https://example.com');
  print(response.body);
}
0
likes
40
pub points
0%
popularity

Publisher

verified publisheramond.dev

A package:http BaseClient that speaks HTTP/2, and can maintain connections.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

http, http2, http_parser, tuple

More

Packages that depend on ok_http2