A Flutter HTTP package supports authorization and caching
- Configuration for multiple API domains
- Built-in
authData
storage to simply store token or user credential - Handle unauthorized requests by define
onUnauthorized
method - Specify when to retry the requests via
shouldRetry
&onError
method - Cache API response (for GET requests)
- Set request headers (such as: authorization token,...)
- Set request baseURL (Ex:
http://yourhost.com/api
) - Set request timeout
All methods from BaseClient
is inherited, including get
, post
, put
, patch
and more. See at BaseClient APIs.
- Support fake responses for testing