jaguar_retrofit_gen 2.8.5 copy "jaguar_retrofit_gen: ^2.8.5" to clipboard
jaguar_retrofit_gen: ^2.8.5 copied to clipboard

outdated

Generator for jaguar_retrofit, a Retrofit inspired declarative HTTP client.

jaguar_http_cli #

An Http Api generator inspired by Retrofit for Dart

Install #

pub global activate jaguar_http_cli

Usage #

A simple usage example:

pubspec.yaml

jaguar_http:
  - example/example.dart

example.yaml

library example;

part 'example.g.dart';

/// definition
@JaguarHttp(name: "Api")
abstract class ApiDefinition extends JaguarInterceptors {
  @Get("/users/:id")
  Future<JaguarResponse<User>> getUserById(@Param() String id);

  @Post("/users")
  Future<JaguarResponse<User>> postUser(@Body() User user);

  @Put("/users/:uid")
  Future<JaguarResponse<User>> updateUser(@Param(name: "uid") String userId, @Body() User user);

  @Delete("/users/:id")
  Future<JaguarResponse> deleteUser(@Param() String id);
}

run

jaguar_http build

use it

final api = new Api(new IOClient(), "http://localhost:9000", serializers: repo);

Features and bugs #

Please file feature requests and bugs at the issue tracker.

0
likes
0
pub points
17%
popularity

Publisher

unverified uploader

Generator for jaguar_retrofit, a Retrofit inspired declarative HTTP client.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

analyzer, build, jaguar_resty, jaguar_retrofit, logging, meta, source_gen

More

Packages that depend on jaguar_retrofit_gen