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
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.
Works with
Packages commonly used together with requests: ones it builds on, ones built on it, and its own family.
- cryptorequests depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- quiverrequests depends on itA set of utility libraries for Dart containing collections, async tools, and testing helpers.
- hexrequests depends on itProvides simple HEX.encode and HEX.decode functions for converting between byte lists and hexadecimal strings.