sexy_api_client 0.0.7+7 copy "sexy_api_client: ^0.0.7+7" to clipboard
sexy_api_client: ^0.0.7+7 copied to clipboard

A simple wrapper around Google's http module for easily making Query String API calls.

sexy_api_client #

A simple wrapper around Google's http module for easily making Query String API calls.

Hecho en 🇵🇷 por Radamés J. Valentín Reyes

Note: This library makes an http Get request to the specified URL, concatenates the path to the URL if one is specified and URI encodes data and formats it following the QueryString Specs. Any thrown errors are from the http module it depends on.

Import Packages #

import 'package:sexy_api_client/sexy_api_client.dart';

Example #

Get request #

//Define parameters
Map<String,String> parameters = {
  'format':'json',
};
//Make the API call to the specified URL using the Map parameters
String myResponse = await SexyAPI(url: 'https://api64.ipify.org',parameters: parameters).get();
//Print the server response
print(myResponse);

Post request #

Map<String,String> parameters = {
  'format':'json',
};
Map<String,String> contentToPost = {
  "key" : "value",
};
String myResponse = await SexyAPI(
  url: 'https://api64.ipify.org',
  parameters: parameters,
).post(
  body: contentToPost,
);
print(myResponse);

Patch, Put and Delete #

Use this request exactly like in the other examples. It's all the same.


Contribute/donate by tapping on the Pay Pal logo/image #


0
likes
110
pub points
32%
popularity

Publisher

unverified uploader

A simple wrapper around Google's http module for easily making Query String API calls.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

http, meta

More

Packages that depend on sexy_api_client