SHIC (Simple HTTP Interceptor Chain) is just another library for HTTP requests.
A little bit based on OkHttp library.
this library is currently in WIP
- build on top of http library
- use base url for requests to avoid pass full url in all http calls
Add dependency to project:
flutter pub add shic --git-url=https://github.com/pedrox-hs/flutter_packages --git-path=shic
Basic usage:
// example/main.dart
import 'package:http/http.dart' as http;
import 'package:shic/shic.dart';
void main() {
final http.Client httpClient = InterceptableClient.withDefaultInterceptors(
baseUrl: 'https://api.example.com',
interceptors: [
// add custom interceptors
],
);
// use httpClient
}