alphax_native 1.0.0-rc.4 copy "alphax_native: ^1.0.0-rc.4" to clipboard
alphax_native: ^1.0.0-rc.4 copied to clipboard

Platform transport adapters for AlphaX using Dart IO, Cronet, and URLSession.

example/main.dart

import 'package:alphax/alphax.dart';
import 'package:alphax_native/alphax_native.dart';

/// Sends one request through the automatically selected native transport.
Future<void> main() async {
  final client = AlphaXClient(transport: await createAlphaXTransport());
  try {
    final response = await client.get(Uri.https('example.com', '/'));
    final metrics = await response.completionMetrics;
    print('${response.statusCode}: ${await response.readAsString()}');
    print('negotiated protocol: ${metrics.negotiatedProtocol.name}');
  } finally {
    await client.close();
  }
}
0
likes
0
points
410
downloads

Publisher

verified publisherauvanaventures.com

Weekly Downloads

Platform transport adapters for AlphaX using Dart IO, Cronet, and URLSession.

Repository (GitHub)
View/report issues

Topics

#networking #http #flutter #cronet #urlsession

License

unknown (license)

Dependencies

alphax, flutter

More

Packages that depend on alphax_native

Packages that implement alphax_native