Skip to content
pubscout

sync_http

0.3.1, released 4 years ago by google.dev

Synchronous HTTP client for Dart using RawSynchronousSockets.

$ flutter pub add sync_http
Source repository

What it does

Provides a synchronous HTTP client implementation using RawSynchronousSockets to allow for synchronous HTTP requests. It blocks the calling thread to wait for a response from the server.

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

Use it when

  • You need to connect to HTTP servers hosted on localhost
  • You have very specialized use cases requiring synchronous requests

Skip it when

  • General HTTP usage is required
  • Your application requires high performance
  • You cannot afford to block the calling thread while waiting for a server response

Strengths

  • Allows synchronous HTTP requests
  • Stable version for null safety

Weaknesses

  • Blocks the calling thread and cannot process other events while waiting
  • Not suitable for applications requiring high performance

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0
not documented

Alternatives

Packages that do the same job and could replace sync_http.

  • http

    Recommended for general HTTP usage and asynchronous I/O performance.

  • dio

    Powerful HTTP client supporting interceptors, global configuration, and asynchronous requests.

Works with

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