5 Extended HTTP support. Again.
7 * Introduces the http namespace.
8 * PHP stream based message bodies.
9 * Encapsulated env request/response.
10 * Modular client support.
14 This extension is hosted at [PECL](http://pecl.php.net) and can be installed with [PEAR](http://pear.php.net)'s pecl command:
16 # pecl install pecl_http
20 pecl/http depends on a number of system libraries and PHP extensions for special features.
22 #### Required system libraries:
24 The following system libraries are required to build this extension:
27 : Provides gzip/zlib/deflate encoding.
28 Configure: `--with-http-zlib-dir`
29 Minimum version: 1.2.0.4
30 Install on Debian: `apt-get install zlib1g-dev`
33 #### Optional system libraries:
35 The following system libraries are optional and provide additional features:
38 : Provides HTTP request functionality.
39 Configure: `--with-http-libcurl-dir`
40 Minimum version: 7.18.2
41 Install on Debian: `apt-get install libcurl4-openssl-dev`
44 : Provides brotli encoding.
45 Configure: `--with-http-libbrotli-dir`
47 Install on Debian: `apt-get install libbrotli-dev`
50 : Internal event loop support for the HTTP client.
51 Configure: `--with-http-libevent-dir`
53 Install on Debian: `apt-get install libevent-dev`
56 : Provides IDNA2003 and/or IDNA2008 support in URLs.
57 Configure: `--with-http-libicu-dir`
59 Install on Debian: `apt-get install libicu-dev`
62 : Provides IDNA2003 support in URLs.
63 Configure: `--with-http-libidn-dir`
65 Install on Debian: `apt-get install libidn11-dev`
68 : Provides IDNA2008 support in URLs.
69 Configure: `--with-http-libidn2-dir`
71 Install on Debian: `apt-get install libidn2-0-dev`
74 : Provides IDNA2003 support in URLs. Conflicts with libidnkit2.
75 Configure: `--with-http-libidnkit-dir`
77 Install on Debian: N/A
80 : Provides IDNA2008 support in URLs. Conflicts with libidnkit.
81 Configure: `--with-http-libidnkit2-dir`
83 Install on Debian: N/A
85 ##### A note on IDNA libraries:
87 If configured with multiple IDNA libraries' support, there's a run-time precedence of ICU over GNU libidn, which in turn has precendence over idnkit. If neither IDNA2008, nor IDNA2003 is explicitly requested, IDNA2008 has precendence.
89 ##### A note on the CURL library:
91 There are usually different styles of SSL support for libcurl available, so you can choose between 'openssl' and f.e. 'nss' or 'gnutls' when installing libcurl.
95 This extension unconditionally depends on the pre-loaded presence of the following PHP extensions:
98 * propro (only until < 4.0.0, resp. PHP 8)
102 If configured ```--with-http-shared-deps``` (default) it depends on the pre-loaded presence of the following extensions, as long as they were available at build time:
106 * json (only until < 2.4.0)
108 Please ensure that all extension on which pecl/http depends, are loaded before it, e.g in your `php.ini`:
112 extension = propro.so (PHP < 8.0, ext-http < 3.0 only)
114 ; if shared deps were enabled
119 ; finally load pecl/http
125 * http.etag.mode = "crc32b"
126 Default hash method for dynamic response payloads to generate an ETag.
130 The http extension registers the ```http.*``` namespace for its stream filters. Provided stream filters are:
132 * http.chunked_decode
133 Decode a stream encoded with chunked transfer encoding.
134 * http.chunked_encode
135 Encode a stream with chunked transfer encoding.
137 Decode a stream encoded with deflate/zlib/gzip encoding.
139 Encode a stream with deflate/zlib/gzip encoding.
144 * Dropped the pecl/event conflict.
146 * Dropped the ext/json dependency.
148 * Added libidn2 and libicu as fallback for IDNA support.
150 * Added idnkit-1 IDNA2003 support.
151 * Added idnkit-2 IDNA2008 support.
152 * Added ICU IDNA2008 support.
153 * Added explicit configuration options for each IDNA library.
155 * Added brotli encoding support.