{"id":51974445,"url":"https://github.com/edde746/win_http","last_synced_at":"2026-07-30T03:30:25.944Z","repository":{"id":349871526,"uuid":"1204350591","full_name":"edde746/win_http","owner":"edde746","description":"A Dart HTTP client for package:http using the native Windows WinHTTP API","archived":false,"fork":false,"pushed_at":"2026-05-25T21:11:41.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-07-01T11:14:57.931Z","etag":null,"topics":["dart","flutter","http-client","winhttp"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/win_http","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edde746.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-07T23:44:04.000Z","updated_at":"2026-05-25T21:11:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/edde746/win_http","commit_stats":null,"previous_names":["edde746/win_http"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/edde746/win_http","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edde746%2Fwin_http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edde746%2Fwin_http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edde746%2Fwin_http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edde746%2Fwin_http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edde746","download_url":"https://codeload.github.com/edde746/win_http/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edde746%2Fwin_http/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36059044,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-30T02:00:05.956Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","flutter","http-client","winhttp"],"created_at":"2026-07-30T03:30:23.611Z","updated_at":"2026-07-30T03:30:25.841Z","avatar_url":"https://github.com/edde746.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"A Windows HTTP client for [`package:http`][package:http Client] using the\nnative [WinHTTP][] API.\n\n## Motivation\n\nUsing [WinHTTP][], rather than the socket-based\n[`dart:io` HttpClient][dart:io HttpClient] implementation, has several\nadvantages:\n\n1. It automatically supports Windows system proxy settings (WPAD, PAC scripts).\n2. It uses the Windows TLS stack (Schannel) with system certificate stores.\n3. It supports automatic gzip/deflate decompression.\n4. It integrates with Windows network diagnostics and logging.\n\n## Requirements\n\n- **Windows 8.1 or later** (required for automatic proxy detection and\n  decompression)\n- **Dart SDK 3.4+**\n\n## Using\n\nThe easiest way to use this library is via the high-level interface\ndefined by [`package:http` Client][package:http Client].\n\nThis approach allows the same HTTP code to be used on all platforms, while\nstill allowing platform-specific setup.\n\n```dart\nimport 'dart:io';\n\nimport 'package:http/http.dart';\nimport 'package:http/io_client.dart';\nimport 'package:win_http/win_http.dart';\n\nvoid main() async {\n  final Client httpClient;\n  if (Platform.isWindows) {\n    httpClient = WinHttpClient.defaultConfiguration();\n  } else {\n    httpClient = IOClient();\n  }\n\n  final response = await httpClient.get(\n    Uri.https('www.googleapis.com', '/books/v1/volumes', {'q': 'dart'}),\n  );\n  print('Status: ${response.statusCode}');\n  httpClient.close();\n}\n```\n\n### Configuration\n\nUse `WinHttpClient.fromConfiguration` for custom settings:\n\n```dart\nfinal client = WinHttpClient.fromConfiguration(\n  WinHttpClientConfiguration(\n    userAgent: 'MyApp/1.0',\n    connectTimeout: Duration(seconds: 10),\n    receiveTimeout: Duration(seconds: 30),\n  ),\n);\n```\n\n### Proxy configuration\n\nBy default, `WinHttpClient` uses automatic proxy detection\n(`WinHttpAccessType.automatic`). You can configure a named proxy:\n\n```dart\nfinal client = WinHttpClient.fromConfiguration(\n  WinHttpClientConfiguration(\n    accessType: WinHttpAccessType.named,\n    proxy: 'proxy.example.com:8080',\n    proxyBypass: 'localhost;*.local',\n  ),\n);\n```\n\nOr disable the proxy entirely:\n\n```dart\nfinal client = WinHttpClient.fromConfiguration(\n  WinHttpClientConfiguration(\n    accessType: WinHttpAccessType.noProxy,\n  ),\n);\n```\n\n## Supported features\n\n| Feature | Status |\n|---|---|\n| HTTP/HTTPS | Supported |\n| GET, POST, PUT, PATCH, DELETE, HEAD | Supported |\n| Request headers | Supported |\n| Response streaming | Supported |\n| Redirect following | Supported (configurable) |\n| Gzip/deflate decompression | Automatic |\n| System proxy (WPAD/PAC) | Automatic |\n| TLS via Windows Schannel | Automatic |\n| Cookies | Per-request only (no cross-request cookie jar) |\n| Abort/cancel | Partial (response-stream abort works; pre-send abort requires async WinHTTP) |\n| Streaming request body | Not supported (body materialized in memory) |\n\n## Known limitations\n\n- **Request bodies are buffered in memory.** The entire request body is\n  materialized before sending, similar to [`cronet_http`][cronet_http]. This is\n  fine for typical API payloads but not ideal for multi-GB uploads.\n\n- **Headers persist across redirects.** WinHTTP transfers request headers\n  (including `Authorization`) across redirect hops. Be cautious with\n  sensitive headers when following redirects to untrusted domains.\n\n- **Folded headers.** WinHTTP handles RFC 2822 folded headers internally\n  but normalizes whitespace differently than some clients expect.\n\n[WinHTTP]: https://learn.microsoft.com/en-us/windows/win32/winhttp/about-winhttp\n[dart:io HttpClient]: https://api.dart.dev/stable/dart-io/HttpClient-class.html\n[package:http Client]: https://pub.dev/documentation/http/latest/http/Client-class.html\n[cronet_http]: https://pub.dev/packages/cronet_http\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedde746%2Fwin_http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedde746%2Fwin_http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedde746%2Fwin_http/lists"}