{"id":18794582,"url":"https://github.com/effectra/http-client","last_synced_at":"2025-07-25T00:14:17.495Z","repository":{"id":167578705,"uuid":"643202917","full_name":"effectra/http-client","owner":"effectra","description":"Effectra's HTTP Client is a lightweight PHP library for sending HTTP requests. With cURL integration, it supports various methods and headers. Simplify API interactions with a streamlined design and intuitive API. Ideal for interacting with HTTP-based services.","archived":false,"fork":false,"pushed_at":"2023-10-13T11:20:16.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-21T16:13:06.820Z","etag":null,"topics":["api","api-client","client","fetch-api","http","http-client","http-message","php","psr","psr-18"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/effectra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-05-20T12:23:44.000Z","updated_at":"2023-05-20T12:36:21.000Z","dependencies_parsed_at":"2024-12-29T16:41:29.503Z","dependency_job_id":null,"html_url":"https://github.com/effectra/http-client","commit_stats":null,"previous_names":["effectra/http-client"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/effectra/http-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Fhttp-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Fhttp-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Fhttp-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Fhttp-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/effectra","download_url":"https://codeload.github.com/effectra/http-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Fhttp-client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266930071,"owners_count":24008213,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"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":["api","api-client","client","fetch-api","http","http-client","http-message","php","psr","psr-18"],"created_at":"2024-11-07T21:29:50.868Z","updated_at":"2025-07-25T00:14:17.445Z","avatar_url":"https://github.com/effectra.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Effectra HTTP Client\n\nEffectra HTTP Client is a lightweight PHP library that simplifies sending HTTP requests and handling responses. It provides an intuitive interface and utilizes cURL for efficient communication with HTTP-based APIs and services.\n\n## Installation\n\nYou can install the library using Composer. Run the following command in your project directory:\n\n```shell\ncomposer require effectra/http-client\n```\n\n## Usage\n\nTo send an HTTP request, create an instance of the `Client` class and call the `sendRequest` method:\n\n```php\nuse Effectra\\Http\\Client\\Client;\nuse Effectra\\Http\\Message\\Request;\nuse Effectra\\Http\\Message\\Uri;\n\n$client = new Client();\n\n// Create a request object\n$request = new Request('GET', new Uri('https://api.example.com/users'));\n\n// Send the request and get the response\n$response = $client-\u003esendRequest($request);\n\n// Access the response status code\n$status = $response-\u003egetStatusCode();\n\n// Access the response headers\n$headers = $response-\u003egetHeaders();\n\n// Access the response body as a string\n$body = $response-\u003egetBody()-\u003egetContents();\n\n// Process the response data as needed\n// ...\n```\n\nYou can also use convenience methods like `get`, `post`, `put`, `patch`, `delete`, and `head` to send requests with specific methods.\n\n```php\nuse Effectra\\Http\\Client\\Client;\n\n$client = new Client();\n\n// Send the request and get the response\n$response = $client-\u003eget('https://api.example.com/users');\n\n// Access the response status code\n$status = $response-\u003egetStatusCode();\n\n// Access the response headers\n$headers = $response-\u003egetHeaders();\n\n// Access the response body as a string\n$body = $response-\u003egetBody()-\u003egetContents();\n\n// Process the response data as needed\n// ...\n```\n\n## Contributing\n\nContributions are welcome! Feel free to open issues or submit pull requests for any improvements or bug fixes you'd like to contribute.\n\n## License\n\nThis library is licensed under the [MIT License](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feffectra%2Fhttp-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feffectra%2Fhttp-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feffectra%2Fhttp-client/lists"}