cinch 4.1.1 copy "cinch: ^4.1.1" to clipboard
cinch: ^4.1.1 copied to clipboard

cinch is powerful http client for dart, support native and js, http client using dio.

example/main.dart

import 'package:cinch/cinch.dart';

import 'test_service.dart' as test;

Future<void> main(List<String> args) async {
  final service = test.TestService();
  test.Response response = await service.upload(MultipartFile.fromFileSync(
      '/Users/liaojianxun/Downloads/Resume.docx',
      filename: 'test.docx'));
  print(response);
  response = await service.multiUpload(88, <String, MultipartFile>{
    'file0': MultipartFile.fromFileSync(
        '/Users/liaojianxun/Downloads/Resume.docx',
        filename: 'test0.docx'),
    'file1': MultipartFile.fromFileSync(
        '/Users/liaojianxun/Downloads/Resume.docx',
        filename: 'test1.docx')
  });
  print(response);
  response = await service.multiUpload(99, <String, MultipartFile>{
    for (var i = 0; i < 5; i++)
      'file$i': MultipartFile.fromFileSync(
          '/Users/liaojianxun/Downloads/Resume.docx',
          filename: 'test$i.docx'),
  });
  print(response);
}
4
likes
160
points
262
downloads

Publisher

verified publishertatsuyuki25.com

Weekly Downloads

cinch is powerful http client for dart, support native and js, http client using dio.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

dio, meta

More

Packages that depend on cinch