Skip to content
pubscout

cupertino_http

3.1.1, released 2 weeks ago by dart.dev

macOS/iOS Flutter plugin providing access to the Foundation URL Loading System.

$ flutter pub add cupertino_http
Source repository

What it does

Provides an implementation of package:http and package:web_socket using the native Apple Foundation URL Loading System. This allows Dart HTTP code on iOS and macOS to leverage native features like VPNs, proxies, HTTP/3, and custom configuration options.

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

Use it when

  • You need native iOS/macOS features like VPN or proxy support for your HTTP requests.
  • You want to use package:http with platform-specific Foundation URL Loading System configurations on Apple platforms.

Skip it when

  • You are building for non-Apple platforms where this specific plugin does not apply.
  • You need a cross-platform HTTP client that doesn't require platform-specific conditional branches.

Strengths

  • Automatically supports iOS/macOS platform features such as VPNs and HTTP proxies.
  • Supports advanced configuration options like blocking cookies and custom redirect handling.
  • Supports modern HTTP features such as HTTP/3.

Weaknesses

  • Limited primarily to macOS and iOS platforms.
  • Requires platform-specific conditional setup in your Dart code.

Setup

Kind
FFI (native library)
Effort
Low
Code generation
No
Direct dependencies
10

Not documented

import 'dart:io';
import 'package:cupertino_http/cupertino_http.dart';
import 'package:http/http.dart';

void main() async {
  final Client httpClient = CupertinoClient.defaultSessionConfiguration();
  final response = await httpClient.get(Uri.https('pub.dev', '/api/packages/cupertino_http/score'));
  httpClient.close();
}

Alternatives

Packages that do the same job and could replace cupertino_http.

Works with

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