chopper 1.1.0 chopper: ^1.1.0 copied to clipboard
Chopper is an http client generator using source_gen and inspired from retrofit
import 'package:chopper/chopper.dart';
import 'definition.dart';
main() async {
final chopper = ChopperClient(
baseUrl: "http://localhost:8000",
services: [
// the generated service
MyService.create()
],
jsonApi: true,
);
final myService = chopper.service<MyService>(MyService);
final response = await myService.getMapResource("1");
print(response.body);
chopper.close();
}