Library to facilitate http requests with Rest API.

Features

  • Authentication with JWT.
  • HTTP error handling.
  • File upload support.

Getting started

Initialize the library:

  IwsHttp.setup(
      authority: 'mydomain.com',
      apiKey: 'my_secret_api_key',
      basePath: 'api/',
      secureConnection: true,
      bearerToken: 'my_secret_token');

Usage

Make HTTP requests

IwsHttp().post(path: 'login', body: {'email': 'user@example.com'}, auth: false);

Libraries

iws_http