jaguar_http_cli 0.0.2+1 copy "jaguar_http_cli: ^0.0.2+1" to clipboard
jaguar_http_cli: ^0.0.2+1 copied to clipboard

Dart 1 only

Cli for Jaguar Http, Api generator inspired by Retrofit for Dart.

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
25
pub points
0%
popularity

Publisher

unverified uploader

Cli for Jaguar Http, Api generator inspired by Retrofit for Dart.

Homepage

License

BSD-3-Clause (LICENSE)

Dependencies

analyzer, build, build_runner, code_builder, http, jaguar_generator_config, jaguar_http, logging, source_gen

More

Packages that depend on jaguar_http_cli