{"id":15226367,"url":"https://github.com/phpcurl/curlhttp","last_synced_at":"2025-05-14T01:31:17.486Z","repository":{"id":57040269,"uuid":"50978529","full_name":"phpcurl/curlhttp","owner":"phpcurl","description":"The simplest cURL HTTP client for PHP","archived":false,"fork":false,"pushed_at":"2017-07-26T00:29:17.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-14T16:11:35.712Z","etag":null,"topics":["curl","httlclient","http","php"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/phpcurl/curlhttp","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/phpcurl.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":"2016-02-03T06:15:33.000Z","updated_at":"2017-11-12T16:32:28.000Z","dependencies_parsed_at":"2022-08-24T00:50:54.850Z","dependency_job_id":null,"html_url":"https://github.com/phpcurl/curlhttp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpcurl%2Fcurlhttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpcurl%2Fcurlhttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpcurl%2Fcurlhttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpcurl%2Fcurlhttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phpcurl","download_url":"https://codeload.github.com/phpcurl/curlhttp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225268981,"owners_count":17447448,"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":["curl","httlclient","http","php"],"created_at":"2024-09-28T20:04:49.663Z","updated_at":"2024-11-18T23:43:41.359Z","avatar_url":"https://github.com/phpcurl.png","language":"PHP","readme":"# CurlHttp\n[![Total Downloads](https://img.shields.io/packagist/dt/phpcurl/curlhttp.svg)](https://packagist.org/packages/phpcurl/curlhttp)\n[![Latest Stable Version](https://img.shields.io/packagist/v/phpcurl/curlhttp.svg)](https://packagist.org/packages/phpcurl/curlhttp)\n[![Travis Build](https://travis-ci.org/phpcurl/curlhttp.svg?branch=master)](https://travis-ci.org/phpcurl/curlhttp)\n[![SensioLabs Insight](https://img.shields.io/sensiolabs/i/bec0987d-5d9e-4895-9a34-435d5191710c.svg)](https://insight.sensiolabs.com/projects/bec0987d-5d9e-4895-9a34-435d5191710c)\n\n\nThe simplest cURL HTTP client for PHP\n\n## Install\nVia [composer](https://getcomposer.org):\n`$ composer require \"phpcurl/curlhttp\"`\n\n## Usage\n```php\n\u003c?php\nuse PHPCurl\\CurlHttp\\HttpClient;\n\n$http = new HttpClient();\n\n$response = $http-\u003epost('http://example.com/?a=b', 'my post data', ['User-Agent: My php crawler']);\n// Supported: get(), post(), head(), post(), put(), delete()\n\n$body = $response-\u003egetBody(); // Response body, string\n\n/*\n\n\u003c!doctype html\u003e\n\u003chtml\u003e\n...\n\u003c/html\u003e\n\n */\n\n$statusCode = $response-\u003egetStatus(); // HTTP status, int\n\n/*\n\n200\n\n */\n\n$headers = $response-\u003egetHeaders(); // HTTP response headers, array\n/*\n\narray(\n  0 =\u003e 'HTTP/1.1 200 OK',\n  1 =\u003e 'Accept-Ranges: bytes',\n  2 =\u003e 'Cache-Control: max-age=604800',\n  3 =\u003e 'Content-Type: text/html',\n  4 =\u003e 'Date: Wed, 03 Feb 2016 07:01:58 GMT',\n  5 =\u003e 'Etag: \"359670651\"',\n  6 =\u003e 'Expires: Wed, 10 Feb 2016 07:01:58 GMT',\n  7 =\u003e 'Last-Modified: Fri, 09 Aug 2013 23:54:35 GMT',\n  8 =\u003e 'Server: ECS (rhv/818F)',\n  9 =\u003e 'Vary: Accept-Encoding',\n  10 =\u003e 'X-Cache: HIT',\n  11 =\u003e 'x-ec-custom-error: 1',\n  12 =\u003e 'Content-Length: 1270',\n);\n\n */\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpcurl%2Fcurlhttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphpcurl%2Fcurlhttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpcurl%2Fcurlhttp/lists"}