jpl_rest_client 2.4.0 copy "jpl_rest_client: ^2.4.0" to clipboard
jpl_rest_client: ^2.4.0 copied to clipboard

A Dart implementation of the a REST client that supports using an Isolate for decoding.

🛡️ Fork — Jeff Peiffer Legacy (jpl_) #

Este paquete (jpl_rest_client) es un fork de rest_client, originalmente creado por Jeff Peiffer y archivado (read-only) junto con toda la org peiffer-innovations.

El prefijo jpl_ significa Jeff Peiffer Legacy: mantenemos vivo el legado de estos paquetes, bumpeados a las últimas versiones de Dart/Flutter, en el monorepo jpl.

Licencia original conservada. El crédito del diseño y la implementación original es de Jeff Peiffer.

No longer maintained: I've decoded to stop maintaining this to focus on other thigs.

Table of Contents

rest_client #

Dart Publisher

A Dart and Flutter compatible library to simplify creating REST based API calls.

For Flutter based applications, this will offload the JSON decoding to a separate Isolate to avoid janking the UI thread on large JSON responses. For Dart Web / AngularDart based applications, this processes the JSON on the main thread because Isolates are not supported.

Using the library #

Add the repo to your Flutter pubspec.yaml file.

dependencies:
  rest_client: <<version>> 

Then run...

flutter packages get

Authorizers #

The API Client offers the following two built in authorizers.

  • BasicAuthorizer -- To authenticate against an API using the BASIC username / password security models.
  • TokenAuthorizer -- To authorize against an API using Bearer token based authorization.

Example #

import 'package:rest_client/rest_client.dart' as rc;

...

var client = rc.Client();

var request = rc.Request(
  url: 'https://google.com',
);

var response = client.execute(
  authorizor: rc.TokenAuthorizer(token: 'my_token_goes_here'),
  request: request, 
);

var body = response.body;
// do further processing here...
0
likes
140
points
7
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Dart implementation of the a REST client that supports using an Isolate for decoding.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

http, intl, logging, meta, uuid

More

Packages that depend on jpl_rest_client