jaguar_client 0.0.1-dev copy "jaguar_client: ^0.0.1-dev" to clipboard
jaguar_client: ^0.0.1-dev copied to clipboard

outdatedDart 1 only

Write concise JSON API clients

jaguar_client #

Concise JSON client library for Dart and Jaguar based on package:http

  • Built-in PODO serialization using jaguar_serializer
  • Simple and intuitive API
  • Various authentication support
    • JSON authentication
    • url-encoded-form authentication
    • Basic authentication
    • Planned
      • Facebook oauth
      • Google oauth
      • Google 2FA
  • Session management
    • Browser: LocalStorage
    • Flutter: SharedPreferences
    • IO: DB, File
  • JWT authentication support
  • ResourceClient to access DataStore or a resource
  • BasedJsonClient and PathJsonClient enables writing concise REST calls

Usage #

Basic requests #

Get request #

final JsonResponse resp =
    await client.get('http://localhost:8080/api/list');
print(resp.body);

Post request #

final JsonResponse resp = await client
    .post('http://localhost:8080/api/map', body: {'posting': 'hello'});
print(resp.body);

Put request #

final JsonResponse resp = await client
    .put('http://localhost:8080/api/map', body: {'putting': 'hello'});
print(resp.body);

Delete request #

final JsonResponse resp =
    await client.delete('http://localhost:8080/api/map/123?query=why');
print(resp.body);

Automatic serialization #

TODO

Authentication #

TODO

Session management #

TODO

1
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Write concise JSON API clients

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

auth_header, http, jaguar_common, jaguar_serializer

More

Packages that depend on jaguar_client