Skip to content
pubscout

requests

4.7.0, released 4 years ago by an unverified publisher

A Dart library for HTTP requests inspired by python-requests with cookie storage.

Unverified publisher
$ flutter pub add requests
Source repository

What it does

Allows making HTTP requests (GET, POST, DELETE, etc.) with automatic cookie handling, custom body encoding, response parsing, and error checking.

AI-written summary of version 4.7.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want an API similar to Python's requests module in Dart
  • You need automatic storage and re-sending of server-side cookies
  • You want simple methods to inspect response status and decode JSON bodies

Skip it when

  • You require advanced enterprise HTTP features like interceptors or global configuration
  • You are already using a more robust client like Dio for complex networking

Strengths

  • Simple and intuitive API inspired by Python requests
  • Built-in lightweight automatic cookie management
  • Easy error handling via raiseForStatus()

Weaknesses

  • Less feature-rich compared to mature networking packages like Dio
  • Limited customization for complex enterprise HTTP flows

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
4

Not documented

var r = await Requests.get('https://google.com');
r.raiseForStatus();
String body = r.content();

Alternatives

Packages that do the same job and could replace requests.

  • dio

    Powerful HTTP client supporting interceptors, global configuration, FormData, and request cancellation.

Works with

Packages commonly used together with requests: ones it builds on, ones built on it, and its own family.