chopper 1.0.0-dev2 copy "chopper: ^1.0.0-dev2" to clipboard
chopper: ^1.0.0-dev2 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 'definition.dart';

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

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

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

  chopper.close();
}
786
likes
0
pub points
97%
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, meta

More

Packages that depend on chopper