{"id":16382551,"url":"https://github.com/daadu/http_plus","last_synced_at":"2025-03-23T03:33:22.118Z","repository":{"id":56832658,"uuid":"463443808","full_name":"daadu/http_plus","owner":"daadu","description":"package:http compatible client that can speak HTTP/2, maintain connections and fallback to HTTP/1.1.","archived":false,"fork":false,"pushed_at":"2023-06-14T05:55:44.000Z","size":52,"stargazers_count":10,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T17:24:46.098Z","etag":null,"topics":["dart","dart2","flutter","http","http-client","http2","http2-client"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/http_plus","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daadu.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}},"created_at":"2022-02-25T07:48:06.000Z","updated_at":"2023-08-15T03:11:15.000Z","dependencies_parsed_at":"2024-10-28T15:24:12.941Z","dependency_job_id":"d476133b-6e89-4a7f-aa25-e81fdb3b15ec","html_url":"https://github.com/daadu/http_plus","commit_stats":{"total_commits":32,"total_committers":3,"mean_commits":"10.666666666666666","dds":0.15625,"last_synced_commit":"880e06aeec42c954d3345f691c7f9cd125261ff4"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daadu%2Fhttp_plus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daadu%2Fhttp_plus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daadu%2Fhttp_plus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daadu%2Fhttp_plus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daadu","download_url":"https://codeload.github.com/daadu/http_plus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245052661,"owners_count":20553162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","dart2","flutter","http","http-client","http2","http2-client"],"created_at":"2024-10-11T04:05:43.385Z","updated_at":"2025-03-23T03:33:21.577Z","avatar_url":"https://github.com/daadu.png","language":"Dart","readme":"# http_plus\n\n\u003cp\u003e\n\u003ca href=\"https://pub.dev/packages/http_plus\"\u003e\u003cimg src=\"https://img.shields.io/pub/v/http_plus?logo=dart\" alt=\"pub.dev\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/daadu/http_plus/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/daadu/http_plus/actions/workflows/ci.yml/badge.svg\" alt=\"ci\"\u003e\u003c/a\u003e\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n\u003ca href=\"#contributors-\"\u003e\u003cimg src=\"https://img.shields.io/badge/all_contributors-3-orange.svg\" alt=\"All Contributors\" /\u003e\u003c/a\u003e\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\u003ca href=\"https://pub.dev/packages/http_plus/score\"\u003e\u003cimg src=\"https://img.shields.io/pub/points/http_plus?logo=dart\" alt=\"pub points\"\u003e\u003c/a\u003e\n\u003ca href=\"https://pub.dev/packages/http_plus/score\"\u003e\u003cimg src=\"https://img.shields.io/pub/popularity/http_plus?logo=dart\" alt=\"popularity\"\u003e\u003c/a\u003e\n\u003ca href=\"https://pub.dev/packages/http_plus/score\"\u003e\u003cimg src=\"https://img.shields.io/pub/likes/http_plus?logo=dart\" alt=\"likes\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/daadu/http_plus/issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/daadu/http_plus?logo=github\" alt=\"GitHub issues\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/daadu/http_plus/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/daadu/http_plus?logo=github\" alt=\"GitHub stars\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/daadu/http_plus/network\"\u003e\u003cimg src=\"https://img.shields.io/github/forks/daadu/http_plus?logo=github\" alt=\"GitHub forks\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n`http_plus` is a drop-in replacement for [`http`](https://pub.dev/packages/http) with `HTTP/2`\ngoodies! Under the hood, it wraps [http2](https://pub.dev/packages/http2) to make it compatible with\nAPIs of `http`. Additionally, it fallbacks to `HTTP/1.1` if H2 is not supported by the server.\n\n\u003e **CREDIT:** This is a fork of [`http2_client`](https://pub.dev/packages/http2_client) package, which is no longer maintained.\n\nThis package is in active development.\n***Any contribution, idea, criticism or feedback is welcomed.***\n\n## Quick links\n\n|                   |                                                 |\n| ----------------- | ------------------------------------------------|\n| **Package**       | https://pub.dev/packages/http_plus              |\n| **API Docs**      | https://pub.dev/documentation/http_plus/latest/ |\n| **Git Repo**      | https://github.com/daadu/http_plus              |\n| **Issue Tracker** | https://github.com/daadu/http_plus/issues       |\n\n## Using\n\nThe easiest way to use this library is via the top-level functions. They allow you to make\nindividual HTTP requests with minimal hassle:\n\n```dart\nimport 'package:http_plus/http_plus.dart' as http;\n\nvoid main() async {\n  final url = Uri.https('example.com', '/whatsit/create');\n  final body = {'name': 'doodle', 'color': 'blue'};\n  // Await http post request\n  final response = await http.post(url, body: body);\n  print('Response status: ${response.statusCode}');\n  print('Response body: ${response.body}');\n  // Close all open connection - if not required\n  http.closeAllConnections();\n}\n```\n\n\u003e For more detail on it check API docs of [top-level functions](https://pub.dev/documentation/http_plus/latest/http_plus/http_plus-library.html#functions).\n\nUnderneath it uses a default client with `maxOpenConnection` set as `8`, this client is re-used\namong all top-level functions. If you want to have more fine-control over the client, then you can\ndefine a custom `HttpPlusClient`:\n\n```dart\nimport 'package:http_plus/http_plus.dart';\n\nvoid main() async {\n  final client = HttpPlusClient(\n    enableHttp2: true,\n    context: SecurityContext(withTrustedRoots: true),\n    badCertificateCallback: (cert, host, port) =\u003e false,\n    connectionTimeout: Duration(seconds: 15),\n    autoUncompress: true,\n    maintainOpenConnections: true,\n    maxOpenConnections: -1,\n    enableLogging: false,\n  );\n\n  final url = Uri.https('example.com', '/whatsit/create');\n  final body = {'name': 'doodle', 'color': 'blue'};\n  // Await http post request\n  final response = await client.post(url, body: body);\n  print('Response status: ${response.statusCode}');\n  print('Response body: ${response.body}');\n  // Close all open connection\n  client.close();\n}\n```\n\n\u003e For more details on it check API docs of [`HttpPlusClient`](https://pub.dev/documentation/http_plus/latest/http_plus/HttpPlusClient-class.html).\n\n## Todo\n\n- Web platform support (use `BrowserClient` directly)\n- Automatic testing\n- Handle HTTP/2 server side push\n- API for basic stats for each request - HTTP/2 vs 1.1, Connection Reuse vs New, etc\n- Allow user to customize logic for connection re-cycling\n- API to close connection to particular socket\n- Live web demo\n\n## Contribute\n\nCheck the [Todo](#todo) section above, before you begin with any contribution.\n\n1. You'll need a GitHub account.\n2. Fork the [repository](https://github.com/daadu/http_plus).\n3. Pick an issue to work on from [issue tracker](https://github.com/daadu/http_plus/issues).\n4. Implement it.\n5. Add your name and email in `authors` section in `pubspec.yaml` file.\n6. Send merge request.\n7. Star this project.\n8. Become a hero!!\n\n## Features and bugs\n\nPlease file feature requests and bugs at\nthe [issue tracker](https://github.com/daadu/http_plus/issues).\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://bhikadia.com/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/4963236?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eHarsh Bhikadia\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/daadu/http_plus/commits?author=daadu\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#ideas-daadu\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n     \u003ctd align=\"center\"\u003e\u003ca href=\"https://jaffaketchup.dev/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/58115698?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eLuka S\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/daadu/http_plus/commits?author=JaffaKetchup\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n     \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/busslina\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/73592852?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ebusslina\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/daadu/http_plus/commits?author=busslina\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors)\nspecification. Contributions of any kind welcome!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaadu%2Fhttp_plus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaadu%2Fhttp_plus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaadu%2Fhttp_plus/lists"}