dio_proxy 1.0.10
dio_proxy: ^1.0.10

Dart native
Flutter Android iOS

a proxy for Dio . dio_proxy interceptor can help us debug network traffic .

dio_proxy Pub #

A new Flutter package project.

Getting Started #

Install #

dependencies:
  dio_proxy: x.x.x #latest version

Usage #

import 'package:dio/dio.dart';
import 'package:dio_proxy/dio_proxy.dart';

void main() async{

    Dio dio = Dio()
      ..options.baseUrl = "https://httpbin.org/"
      ..httpClientAdapter = HttpProxyAdapter(ipAddr: 'localhost', port: 8888);
    
    Response<String> response = await dio.get('/get?a=2');
    print(response.data);

    response = await dio.post('/post', data: {"a": 2});
    print(response.data);
}

1
likes
100
pub points
46%
popularity

Publisher

csdn.net

a proxy for Dio . dio_proxy interceptor can help us debug network traffic .

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

dio

More

Packages that depend on dio_proxy