chopper 2.2.0 copy "chopper: ^2.2.0" to clipboard
chopper: ^2.2.0 copied to clipboard

outdated

Chopper is an http client generator using source_gen and inspired from retrofit

example/main.dart

import 'package:chopper/chopper.dart';
import 'package:chopper/src/interceptor.dart';
import 'definition.dart';

main() async {
  final chopper = ChopperClient(
    baseUrl: "http://localhost:8000",
    services: [
      // the generated service
      MyService.create()
    ],
    converter: JsonConverter(),
  );

  final myService = chopper.getService<MyService>();

  final response = await myService.getMapResource("1");
  print(response.body);

  final list = await myService.getListResources();
  print(list.body);

  chopper.dispose();
}
755
likes
0
pub points
98%
popularity

Publisher

verified publisherhadrienlejard.io

Chopper is an http client generator using source_gen and inspired from retrofit

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

http, logging, meta

More

Packages that depend on chopper