django_rest_framework_client 0.0.3 copy "django_rest_framework_client: ^0.0.3" to clipboard
django_rest_framework_client: ^0.0.3 copied to clipboard

A complete implementation of Authentication and Rest API connection with the backends that use Django Rest Framework. Supports refreshing and storing tokens, supports SimpleJWT

A complete implementation of authentication and Rest API connection with the backends that use Django Rest Framework.

Features #

Supports SimpleJWT #

Automatically store tokens and refresh #

Make quick REST API requests to your DRF backend #

Getting started #

To install it just run:

flutter pub add django_rest_framework_client

and import in in your files like this:

import 'package:django_rest_framework_client/django_rest_framework_client.dart';

Usage #

You can find best practices of using this package in example app.

To use this package, intialize this class:


// use this to authenticate and login.. the app will save tokens using shared_preferences
final AuthManager auth = AuthManager('https://your-drf-api.com/v1/api');

// Call auth.login(); with username and password and u v logged in
// if u have customized django user model, u can pass 3rd optional argument usernameField
// into login method.

// This is how you can use the package with auth requests..
final ApiManager auth = ApiManager('https://your-drf-api.com/v1/api');

// Api.get() post put delete...


Additional information #

For more info and help:

https://docs.tijorat.org/flutter/django-rest-framework-client

2
likes
0
pub points
35%
popularity

Publisher

verified publishertijorat.org

A complete implementation of Authentication and Rest API connection with the backends that use Django Rest Framework. Supports refreshing and storing tokens, supports SimpleJWT

Homepage

License

unknown (LICENSE)

Dependencies

flutter, http, jwt_decoder, shared_preferences

More

Packages that depend on django_rest_framework_client