requests_plus 4.8.6 copy "requests_plus: ^4.8.6" to clipboard
requests_plus: ^4.8.6 copied to clipboard

a flutter library that helps with http requests and stored cookies

example/main.dart

import 'dart:developer';
import 'package:requests_plus/requests_plus.dart';

void main(List<String> arguments) async {
  // This example uses the Google Books API to search for books about requests.
  // https://developers.google.com/books/docs/overview
  const url = 'https://www.googleapis.com/books/v1/volumes?q={requests}';

  // Await the http get response, then decode the json-formatted response.
  final response = await RequestsPlus.get(url);
  if (response.statusCode == 200) {
    final jsonResponse = response.json();
    final itemCount = jsonResponse['totalItems'];
    log('Number of books about requests: $itemCount.');
  } else {
    log('Request failed with status: ${response.statusCode}');
  }
}
1
likes
140
pub points
45%
popularity

Publisher

unverified uploader

a flutter library that helps with http requests and stored cookies

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

crypto, hex, http, quiver

More

Packages that depend on requests_plus