jaguar_retrofit_gen 2.8.10

Dart native

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
55
pub points
60%
popularity

Generator for jaguar_retrofit, a Retrofit inspired declarative HTTP client.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploaders

tejainece@gmail.com
jimmy.aumard@gmail.com

License

BSD (LICENSE)

Dependencies

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

More

Packages that depend on jaguar_retrofit_gen