Skip to content

Latest commit

 

History

History

shic

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

codecov

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

Features

  • build on top of http library
  • use base url for requests to avoid pass full url in all http calls

Getting started

Add dependency to project:

flutter pub add shic --git-url=https://github.com/pedrox-hs/flutter_packages --git-path=shic

Usage

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
}