https://pub.dev/packages/axios_package

Axios package mimicing axios from npm, it is a promise based http client for dart. Allows for easy use of http requests with a simple and easy to use syntax. Works with both dart and flutter. Any backend framework like alfred, shelf, etc..

Features

  • Promise based http client
  • Error handling

API

get(url, headers)

post(url, headers)

put(url, headers)

delete(url, headers)

patch(url, headers)

Usage

import 'package:axios_package/axios_package.dart';

var axios = Axios(baseUrl: 'https://jsonplaceholder.typicode.com');
var response = await axios.get('/posts/1');

For more examples, check out the example folder/tab.

Libraries

axios_package