{"id":15762275,"url":"https://github.com/pear/http_request2","last_synced_at":"2025-04-04T13:12:12.262Z","repository":{"id":3011904,"uuid":"4031008","full_name":"pear/HTTP_Request2","owner":"pear","description":"Provides an easy way to perform HTTP requests (and does not require curl extension for this).","archived":false,"fork":false,"pushed_at":"2023-11-01T19:52:25.000Z","size":691,"stargazers_count":75,"open_issues_count":1,"forks_count":66,"subscribers_count":21,"default_branch":"trunk","last_synced_at":"2024-04-04T07:46:34.267Z","etag":null,"topics":["curl","http","http-client","httpclient","php"],"latest_commit_sha":null,"homepage":"http://pear.php.net/package/HTTP_Request2","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"btamas/btamas.github.com","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pear.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","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":"2012-04-15T09:30:48.000Z","updated_at":"2024-06-18T11:10:29.975Z","dependencies_parsed_at":"2024-06-18T11:20:44.597Z","dependency_job_id":null,"html_url":"https://github.com/pear/HTTP_Request2","commit_stats":{"total_commits":237,"total_committers":11,"mean_commits":"21.545454545454547","dds":0.08016877637130804,"last_synced_commit":"db4ce7844f838d3adca0513a77420c0fec22ed2d"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pear%2FHTTP_Request2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pear%2FHTTP_Request2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pear%2FHTTP_Request2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pear%2FHTTP_Request2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pear","download_url":"https://codeload.github.com/pear/HTTP_Request2/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247182401,"owners_count":20897381,"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","http","http-client","httpclient","php"],"created_at":"2024-10-04T11:08:20.160Z","updated_at":"2025-04-04T13:12:12.246Z","avatar_url":"https://github.com/pear.png","language":"PHP","readme":"\n# HTTP_Request2\n\n[![Build Status](https://github.com/pear/HTTP_Request2/actions/workflows/continuous-integration.yml/badge.svg?branch=trunk)](https://github.com/pear/HTTP_Request2/actions/workflows/continuous-integration.yml)\n[![Static Analysis](https://github.com/pear/HTTP_Request2/actions/workflows/static-analysis.yml/badge.svg?branch=trunk)](https://github.com/pear/HTTP_Request2/actions/workflows/static-analysis.yml)\n\nProvides an easy way to perform HTTP requests, uses pluggable adapters\n\n* Socket: pure PHP implementation of HTTP protocol (does *not* use http stream wrapper), based on older [PEAR HTTP_Request] package\n* Curl: wrapper around PHP's cURL extension\n* Mock: used for testing packages depending on HTTP_Request2, returns predefined responses without network interaction\n\nBoth Socket and Curl adapters support POST requests with data and file uploads, basic and digest\nauthentication, cookies, managing cookies across requests, HTTP and SOCKS5 proxies, gzip and\ndeflate encodings, redirects, monitoring the request progress with Observers...\n\nThis package is [PEAR HTTP_Request2] and has been migrated from [PEAR SVN]\n\nPlease report all issues via the [GitHub issues].\n\nPull requests are welcome.\n\n[PEAR HTTP_Request]: https://pear.php.net/package/HTTP_Request/\n[PEAR HTTP_Request2]: https://pear.php.net/package/HTTP_Request2/\n[PEAR SVN]: https://svn.php.net/repository/pear/packages/HTTP_Request2\n[GitHub issues]: https://github.com/pear/HTTP_Request2/issues\n\n## Installation\n\nThe package may be installed either with PEAR\n\n    $ pear install HTTP_Request2\n\nor with composer\n\n    $ composer require pear/http_request2\n\nSince release 2.4 composer installation relies completely on autoloading and does not contain `require_once` calls or \nuse `include-path` option.\n\n## Basic usage\n\n```PHP\nrequire_once 'HTTP/Request2.php'; // Only when installed with PEAR\n\n$request = new HTTP_Request2('http://pear.php.net/', HTTP_Request2::METHOD_GET);\ntry {\n    $response = $request-\u003esend();\n    if (200 == $response-\u003egetStatus()) {\n        echo $response-\u003egetBody();\n    } else {\n        echo 'Unexpected HTTP status: ' . $response-\u003egetStatus() . ' ' .\n             $response-\u003egetReasonPhrase();\n    }\n} catch (HTTP_Request2_Exception $e) {\n    echo 'Error: ' . $e-\u003egetMessage();\n}\n```\n\n## Documentation\n\n...is available on PEAR website\n\n * Numerous [configuration options](https://pear.php.net/manual/en/package.http.http-request2.config.php)\n * How to populate [the request object](https://pear.php.net/manual/en/package.http.http-request2.request.php)\n * Description of [available adapters](https://pear.php.net/manual/en/package.http.http-request2.adapters.php)\n * Processing of [HTTP response](https://pear.php.net/manual/en/package.http.http-request2.response.php)\n * Monitoring the progress of request with [observers](https://pear.php.net/manual/en/package.http.http-request2.observers.php)\n * Possible [exceptions](https://pear.php.net/manual/en/package.http.http-request2.exceptions.php)\n\n[Generated API documentation](https://pear.php.net/package/HTTP_Request2/docs/latest/) for the current release is also there.\n\n## Testing, Packaging and Installing (Pear)\n\nTo test, run\n\n    $ phpunit tests/\n\nafter installing dependencies with composer. You can also test the installed package with\n\n    $ phpunit [PEAR tests dir]/HTTP_Request2\n\nSince PEAR package needs its `require_once` statements re-enabled, please run the helper file before packaging and\ninstalling\n\n    $ php pear-package-helper.php\n\nThen to build, simply\n\n    $ pear package .pear-package/package.xml\n\nTo install from scratch\n\n    $ pear install .pear-package/package.xml\n\nTo upgrade\n\n    $ pear upgrade -f .pear-package/package.xml\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpear%2Fhttp_request2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpear%2Fhttp_request2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpear%2Fhttp_request2/lists"}