http
http copied to clipboard
A composable API for making HTTP requests in Dart.
I'd like to make few of the test (e.g. `server headers content length bigger than actual body`) optional, because with `fetch`: > This makes the `Content-Length` [header](https://fetch.spec.whatwg.org/#concept-header) unreliable to the...
fixes #1121 --- - [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR. Contribution guidelines: - See our [contributor guide](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md) for general expectations for PRs....
- Thanks for your contribution! Please replace this text with a description of what this PR is changing or adding and why, list any relevant issues, and review the contribution...
- [ ] Design a new API - [ ] Figure out where to put it (in `package:http` in a new package?) - [ ] Create conformance tests/implementations for: -...
``` Stream pseudoFileGenerator(int size) async* { List list = []; for (int i = 0; i < size; i++) { list.add(i); if (i % 1024 == 0) { print('1kb'); yield...
Additional comments to help with issue: https://github.com/dart-lang/http/issues/726
If we made an API request and the application goes into the background while the response get more than 30 sec then we got an exception and the code only...
The Dart SDK exports `HttpStatus` constants for both `dart:io` and `dart:html`. Actually using them in a platform-agnostic way is not particularly straightforward and is awkward. Since one of the purposes...
`dart:io` has a handy `ContentType` class that allows programmers to `parse` the `content-type` response header. [Docs](https://api.dart.dev/stable/2.19.1/dart-io/ContentType-class.html). It'd be nice to have this class (and other `HeaderValue`s) available through `package:http`, (or...
Hello, the current [assumption](https://pub.dev/documentation/http/latest/http/Response/body.html) is that if no charset is defined, a fallback to latin1 should be done. Problem is that for `application/json` no charset means utf8: https://datatracker.ietf.org/doc/html/rfc8259#section-8.1 when using...