Minimal HTTP Client
A Dart package based on Dio that provides minimal http client to handle HTTP services requests. A minimal http client libaray for network call
Usage
To use this package :
- add the dependency to your pubspec.yaml file.
dependencies:
flutter:
sdk: flutter
minimal_http_client: ^0.0.2
How to use minimal_http_client
- At your app start-up initialize below
DioHttpService
final authInterceptor = AuthInterceptor(
headerCallback: () => {
'auth_token':
'Bearer ${DateTime.now().minute}: ${DateTime.now().second}',
'seassion_key': 'my_seassion_key',
},
);
await DioHttpService().init(authInterceptor: authInterceptor);