cinch 2.0.0-nullsafety.2 copy "cinch: ^2.0.0-nullsafety.2" to clipboard
cinch: ^2.0.0-nullsafety.2 copied to clipboard

outdated

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
0
pub points
54%
popularity

Publisher

verified publishertatsuyuki25.com

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

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

dio

More

Packages that depend on cinch