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

Easy to use http services

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
0
points
25
downloads

Publisher

verified publisherataullah.dev

Weekly Downloads

Easy to use http services

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http

More

Packages that depend on restapi_services