via 1.2.2 copy "via: ^1.2.2" to clipboard
via: ^1.2.2 copied to clipboard

A modern, type-safe HTTP client library for Dart/Flutter applications.

example/main.dart

import 'package:via/via.dart';

void main() async {
  // Simple initialization
  final via = Via(base: Uri.parse('https://api.example.com'));

  // Quick Start Example
  print('Welcome to Via! Check the example/ folder for more detailed tests:');
  print('- example/basic.dart: Simple GET/POST');
  print('- example/logs.dart: Professional logging with cURL');
  print('- example/retry.dart: Retry mechanism');
  print('- example/pipeline.dart: Custom pipelines');
  print('- example/isolate.dart: Background execution');
  print('- example/cache_debounce.dart: Performance features');
  print('- example/cancel.dart: Request cancellation');
  print('- example/custom_result.dart: Custom response models');

  try {
    final result = await via.get('/users/1');
    print('User: ${result.response.body}');
  } catch (e) {
    print('Check out the examples above to see Via in action!');
  }
}
1
likes
0
points
606
downloads

Publisher

verified publishergece.dev

Weekly Downloads

A modern, type-safe HTTP client library for Dart/Flutter applications.

Repository (GitHub)
View/report issues

Topics

#http #rest #client #json #networking

License

unknown (license)

Dependencies

flutter, http

More

Packages that depend on via