sync_http

0.3.1

Synchronous HTTP client for Dart.

Download archive

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 SyncHttpClient functions now require the url parameter to be Uri. Previously, both Uri and String were supported.

  • The SyncHttpClientResponse.contentLength getter will return -1 instead of null if content length not specified.

  • Implement chunkedTransferEncoding getters.

v0.2.0

  • Preparation for HttpHeaders change. Update signature of add() and set() to match new signature of HttpHeaders. 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
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

VersionPublishedArchiveSHA-256
0.1.0On demandDownload2e4d05a6…a7136f
0.1.1On demandDownloade535198a…c8ba4e
0.1.2-devOn demandDownload62e8a1e3…c8072d
0.1.2On demandDownloadc431acd8…cf9559
0.1.3On demandDownload0348a668…1fe40c
0.1.4On demandDownloadb2460bc4…6aa40f
0.2.0On demandDownload9ee5c6c6…be0e0f
0.3.0-nullsafety.0On demandDownload788b6531…d1d8e5
0.3.0On demandDownloadf6d9cb90…4c179d
0.3.1Cached · Upstream SHA-256 matchedDownload7f0cd72e…14a961

Dependencies

No direct dependencies declared.