restapi_services 1.0.4 copy "restapi_services: ^1.0.4" to clipboard
restapi_services: ^1.0.4 copied to clipboard

Easy to use http services. With this package, you can send Get, Post, Put and Delete request to any server.

A useful and easy to use HTTP service.

Features #

You can send get request to a server. You can post data to a server. You can update data to a server. You can send delete request to a server.

Usage #

Here is an example:

  // Get request
  var data = ApiService.getData(url: 'https://dummyjson.com/products');
  print('Get response: $data');

  // Post request
  var res1 = ApiService.postData(
    url: 'https://dummyjson.com/products/add',
    body: {'title': 'BMW Pencil'},
  );
  print('Post response: $res1');

  // Put request
  var res2 = ApiService.updateData(
    url: 'https://dummyjson.com/products/1',
    body: {'title': 'iPhone Galaxy +1'},
  );
  print('Put response: $res2');

  // Delete request
  var res3 = ApiService.deleteData(url: 'https://dummyjson.com/products/1');
  print('Delete response: $res3');
3
likes
140
points
35
downloads

Publisher

verified publisherataullah.dev

Weekly Downloads

Easy to use http services. With this package, you can send Get, Post, Put and Delete request to any server.

Homepage
Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

http

More

Packages that depend on restapi_services