win_http 0.2.2 copy "win_http: ^0.2.2" to clipboard
win_http: ^0.2.2 copied to clipboard

A Windows HTTP client for package:http using the native WinHTTP API. Provides system proxy support, Schannel TLS, and automatic decompression. Requires Windows 8.1+.

example/win_http_example.dart

import 'dart:io';

import 'package:win_http/win_http.dart';

void main() async {
  if (!Platform.isWindows) {
    print('This example only works on Windows.');
    return;
  }

  final client = WinHttpClient.defaultConfiguration();
  try {
    final response = await client.get(
      Uri.https('www.googleapis.com', '/books/v1/volumes', {'q': 'dart'}),
    );
    print('Status: ${response.statusCode}');
    print('Body (first 200 chars): ${response.body.substring(0, 200)}...');
  } finally {
    client.close();
  }
}
0
likes
140
points
4.47k
downloads

Documentation

API reference

Publisher

verified publisheredde746.dev

Weekly Downloads

A Windows HTTP client for package:http using the native WinHTTP API. Provides system proxy support, Schannel TLS, and automatic decompression. Requires Windows 8.1+.

Repository (GitHub)
View/report issues

Topics

#http #http-client #windows #winhttp #ffi

License

GPL-3.0 (license)

Dependencies

ffi, http

More

Packages that depend on win_http