iws_http 0.1.0
iws_http: ^0.1.0 copied to clipboard
Library to facilitate http requests with error handling for Rest API requests.
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().httpPost(path: 'login', body: {'email': 'user@example.com'}, auth: false);