alphax_native 1.1.0
alphax_native: ^1.1.0 copied to clipboard
Native Flutter HTTP transports and an application-facing client factory for AlphaX using Android Cronet, Apple URLSession, and a Dart IO fallback.
import 'package:alphax_native/alphax_native.dart';
/// Sends one request through the automatically selected native transport.
Future<void> main() async {
final client = await createAlphaXClient();
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();
}
}