alphax_web 1.0.0-rc.5
alphax_web: ^1.0.0-rc.5 copied to clipboard
Browser Fetch HTTP transport adapter for AlphaX with streaming, cancellation, and truthful capability reporting.
example/main.dart
import 'package:alphax_web/alphax_web.dart';
/// Sends one browser Fetch request.
Future<void> main() async {
final client = createAlphaXClient();
try {
final response = await client.get(Uri.https('example.com', '/'));
final metrics = await response.completionMetrics;
print('${response.statusCode}: ${await response.readAsString()}');
print('protocol metadata: ${metrics.negotiatedProtocol.name}');
} finally {
await client.close();
}
}