Download the PHP package pear/http_request2 without Composer
On this page you can find all versions of the php package pear/http_request2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package http_request2
HTTP_Request2
Provides an easy way to perform HTTP requests, uses pluggable adapters
- Socket: pure PHP implementation of HTTP protocol (does not use http stream wrapper), based on older PEAR HTTP_Request package
- Curl: wrapper around PHP's cURL extension
- Mock: used for testing packages depending on HTTP_Request2, returns predefined responses without network interaction
Both Socket and Curl adapters support POST requests with data and file uploads, basic and digest authentication, cookies, managing cookies across requests, HTTP and SOCKS5 proxies, gzip and deflate encodings, redirects, monitoring the request progress with Observers...
This package is PEAR HTTP_Request2 and has been migrated from PEAR SVN
Please report all issues via the GitHub issues.
Pull requests are welcome.
Installation
The package may be installed either with PEAR
$ pear install HTTP_Request2
or with composer
$ composer require pear/http_request2
Since release 2.4 composer installation relies completely on autoloading and does not contain require_once
calls or
use include-path
option.
Basic usage
Documentation
...is available on PEAR website
- Numerous configuration options
- How to populate the request object
- Description of available adapters
- Processing of HTTP response
- Monitoring the progress of request with observers
- Possible exceptions
Generated API documentation for the current release is also there.
Testing, Packaging and Installing (Pear)
To test, run
$ phpunit tests/
after installing dependencies with composer. You can also test the installed package with
$ phpunit [PEAR tests dir]/HTTP_Request2
Since PEAR package needs its require_once
statements re-enabled, please run the helper file before packaging and
installing
$ php pear-package-helper.php
Then to build, simply
$ pear package .pear-package/package.xml
To install from scratch
$ pear install .pear-package/package.xml
To upgrade
$ pear upgrade -f .pear-package/package.xml