Viewing version 0.3.1. Open the latest package page.
sync_http
0.3.1Synchronous HTTP client for Dart.
Readme
Dart CI pub package package publisher
A Dart HTTP client implemented using RawSynchronousSockets to allow for synchronous HTTP requests.
Using this package
Note: this package is only intended for very specialized use cases. For general HTTP usage, please see instead package:http.
This library should probably only be used to connect to HTTP servers that are hosted on 'localhost'. The operations in this library will block the calling thread to wait for a response from the HTTP server. The thread can process no other events while waiting for the server to respond. As such, this synchronous HTTP client library is not suitable for applications that require high performance. Instead, such applications should use libraries built on asynchronous I/O, including dart:io and package:http, for the best performance.
Changelog
v0.3.1
- Switch to using
package:lints/recommended.yaml - Update the usage guidance in the readme.
v0.3.0
- Stable version for null safety.
v0.3.0-nullsafety.0
-
BREAKING
SyncHttpClientfunctions now require theurlparameter to beUri. Previously, bothUriandStringwere supported. -
The
SyncHttpClientResponse.contentLengthgetter will return-1instead ofnullif content length not specified. -
Implement
chunkedTransferEncodinggetters.
v0.2.0
-
Preparation for HttpHeaders change. Update signature of
add()andset()to match new signature ofHttpHeaders. The parameter is not yet forwarded and will not behave as expected.
v0.1.4
- Fixed issue where query parameters were not being sent as part of requests.
v0.1.3
- Updated SDK version upper bound to 3.0.0.
v0.1.2
- Require Dart 2.
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add 'sync_http:0.3.1'pubspec.yaml
name: sync_http
version: 0.3.1
description: Synchronous HTTP client for Dart.
repository: https://github.com/google/sync_http.dart
environment:
sdk: '>=2.12.0 <3.0.0'
dev_dependencies:
lints: ^1.0.0
test: ^1.16.0
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.1.0 | On demand | Download | 2e4d05a6…a7136f |
| 0.1.1 | On demand | Download | e535198a…c8ba4e |
| 0.1.2-dev | On demand | Download | 62e8a1e3…c8072d |
| 0.1.2 | On demand | Download | c431acd8…cf9559 |
| 0.1.3 | On demand | Download | 0348a668…1fe40c |
| 0.1.4 | On demand | Download | b2460bc4…6aa40f |
| 0.2.0 | On demand | Download | 9ee5c6c6…be0e0f |
| 0.3.0-nullsafety.0 | On demand | Download | 788b6531…d1d8e5 |
| 0.3.0 | On demand | Download | f6d9cb90…4c179d |
| 0.3.1 | Cached · Upstream SHA-256 matched | Download | 7f0cd72e…14a961 |
Dependencies
No direct dependencies declared.