{"id":21771129,"url":"https://github.com/initphp/httpclient","last_synced_at":"2026-05-24T10:02:54.389Z","repository":{"id":57710755,"uuid":"492187001","full_name":"InitPHP/HTTPClient","owner":"InitPHP","description":"PSR-18 HTTP Client","archived":false,"fork":false,"pushed_at":"2022-07-10T21:06:15.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-10T10:07:23.042Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/InitPHP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-14T10:45:02.000Z","updated_at":"2022-07-10T21:06:01.000Z","dependencies_parsed_at":"2022-09-26T21:21:10.770Z","dependency_job_id":null,"html_url":"https://github.com/InitPHP/HTTPClient","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/InitPHP/HTTPClient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InitPHP%2FHTTPClient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InitPHP%2FHTTPClient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InitPHP%2FHTTPClient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InitPHP%2FHTTPClient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InitPHP","download_url":"https://codeload.github.com/InitPHP/HTTPClient/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InitPHP%2FHTTPClient/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33429192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T22:14:44.296Z","status":"online","status_checked_at":"2026-05-24T02:00:06.296Z","response_time":57,"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":[],"created_at":"2024-11-26T14:15:09.855Z","updated_at":"2026-05-24T10:02:54.383Z","avatar_url":"https://github.com/InitPHP.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# InitPHP HTTP Client\n\n\u003e ## ⚠️ DEPRECATED — Use [`initphp/http`](https://github.com/InitPHP/HTTP) instead\n\u003e\n\u003e As part of the InitPHP package consolidation, **this package has been merged into [`initphp/http`](https://github.com/InitPHP/HTTP) starting with version 2.2.** The consolidated package ships its own PSR-18 client that talks to `ext-curl` directly — no separate cURL wrapper is required.\n\u003e\n\u003e This repository is kept read-only for historical reference. **No further updates will be released.**\n\u003e\n\u003e ### Why this package no longer works\n\u003e\n\u003e The standalone `\\InitPHP\\HTTPClient\\Client` was written against `initphp/http:^1.x`, which used the flat `\\InitPHP\\HTTP\\*` namespace. In `initphp/http:^2.0` those classes moved to `\\InitPHP\\HTTP\\Message\\*`, so this package's `use` statements no longer resolve. It is effectively broken against any current version of `initphp/http`.\n\u003e\n\u003e ### Migration\n\u003e\n\u003e Drop the dependency and use the canonical client shipped in `initphp/http`:\n\u003e\n\u003e ```diff\n\u003e - \"initphp/http-client\": \"^1.0\",\n\u003e - \"initphp/http\": \"^1.0\",\n\u003e + \"initphp/http\": \"^2.2\"\n\u003e ```\n\u003e\n\u003e Code change:\n\u003e\n\u003e ```php\n\u003e // Before\n\u003e use InitPHP\\HTTPClient\\Client;\n\u003e use InitPHP\\HTTP\\Request;\n\u003e\n\u003e $client   = new Client(['timeout' =\u003e 0]);\n\u003e $request  = new Request('GET', 'https://example.com');\n\u003e $response = $client-\u003esendRequest($request);\n\u003e\n\u003e // After\n\u003e use InitPHP\\HTTP\\Client\\Client;\n\u003e use InitPHP\\HTTP\\Message\\Request;\n\u003e\n\u003e $client   = new Client();\n\u003e $request  = new Request('GET', 'https://example.com');\n\u003e $response = $client-\u003esendRequest($request);\n\u003e ```\n\u003e\n\u003e See the [HTTP README — Migrating from `initphp/http-client`](https://github.com/InitPHP/HTTP#migrating-from-initphphttp-client) for option-by-option translation notes.\n\n---\n\nIt is HTTP Client library following Psr-18 standards. It uses cURL for HTTP requests. \n\n## Requirements\n\n- PHP 7.4 or higher\n- [Psr-18 HTTP Client Interface Package](https://github.com/php-fig/http-client)\n- [InitPHP HTTP Library](https://github.com/InitPHP/HTTP)\n- [InitPHP Curl Library](https://github.com/InitPHP/Curl)\n\nIn the above libraries themselves; It can have dependencies such as libcurl.\n\n## Installation\n\n```\ncomposer require initphp/http-client\n```\n\n## Usage\n\n```php\nrequire_once \"vendor/autoload.php\";\nuse InitPHP\\HTTPClient\\Client;\n\n/** @var \\Psr\\Http\\Client\\ClientInterface $client */\n$client = new Client();\n\n/** @var \\Psr\\Http\\Message\\RequestInterface $request */\n$request = new \\InitPHP\\HTTP\\Request('GET', 'https://www.example.com');\n\n/** @var \\Psr\\Http\\Message\\ResponseInterface $response */\n$response = $client-\u003esendRequest($request);\n```\n\n\n## Getting Help\n\nIf you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue Tracker.\n\n## Getting Involved\n\n\u003e All contributions to this project will be published under the MIT License. By submitting a pull request or filing a bug, issue, or feature request, you are agreeing to comply with this waiver of copyright interest.\n\nThere are two primary ways to help:\n\n- Using the issue tracker, and\n- Changing the code-base.\n\n### Using the issue tracker\n\nUse the issue tracker to suggest feature requests, report bugs, and ask questions. This is also a great way to connect with the developers of the project as well as others who are interested in this solution.\n\nUse the issue tracker to find ways to contribute. Find a bug or a feature, mention in the issue that you will take on that effort, then follow the Changing the code-base guidance below.\n\n### Changing the code-base\n\nGenerally speaking, you should fork this repository, make changes in your own fork, and then submit a pull request. All new code should have associated unit tests that validate implemented features and the presence or lack of defects. Additionally, the code should follow any stylistic and architectural guidelines prescribed by the project. In the absence of such guidelines, mimic the styles and patterns in the existing code-base.\n\n## Credits\n\n- [Muhammet ŞAFAK](https://www.muhammetsafak.com.tr) \u003c\u003cinfo@muhammetsafak.com.tr\u003e\u003e\n\n## License\n\nCopyright \u0026copy; 2022 [MIT License](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finitphp%2Fhttpclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finitphp%2Fhttpclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finitphp%2Fhttpclient/lists"}