3 [![Build Status](https://travis-ci.org/m6w6/ext-http.svg?branch=R_2_5)](https://travis-ci.org/m6w6/ext-http)
7 Extended HTTP support. Again.
9 * Introduces the http namespace.
10 * PHP stream based message bodies.
11 * Encapsulated env request/response.
12 * Modular client support.
16 This extension is hosted at [PECL](http://pecl.php.net) and can be installed with [PEAR](http://pear.php.net)'s pecl command:
18 # pecl install pecl_http
22 pecl/http depends on a number of system libraries and PHP extensions for special features.
24 #### Required system libraries:
26 The following system libraries are required to build this extension:
29 Provides gzip/zlib/deflate encoding.
30 Minimum version: 1.2.0.4
31 Install on Debian: `apt-get install zlib1g-dev`
34 #### Optional system libraries:
36 The following system libraries are optional and provide additional features:
39 Provides IDNA support in URLs.
41 Install on Debian: `apt-get install libidn11-dev`
44 Provides IDNA support in URLs (fallback if libidn is not available).
46 Install on Debian: `apt-get install libidn2-0-dev`
49 Provides IDNA support in URLs (fallback if libidn is not available).
51 Install on Debian: `apt-get install libicu-dev`
54 Provides HTTP request functionality.
55 Minimum version: 7.18.2
56 Install on Debian: `apt-get install libcurl4-openssl-dev`
57 Note: There are usually different styles of SSL support for libcurl available, so you can replace 'openssl' in the above command f.e. with 'nss' or 'gnutls'.
60 Eventloop support for the HTTP client.
62 Install on Debian: `apt-get install libevent-dev`
66 This extension unconditionally depends on the pre-loaded presence of the following PHP extensions:
68 * [raphf](https://github.com/m6w6/ext-raphf)
69 * [propro](https://github.com/m6w6/ext-propro)
73 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:
77 * json (only until < 2.4.0)
79 Please ensure that all extension on which pecl/http depends, are loaded before it, e.g in your `php.ini`:
85 ; if shared deps were enabled
90 ; finally load pecl/http
95 pecl/http-v2 conflicts with the following extensions:
98 * event (only until <= 2.0.3)
102 * http.etag.mode = "crc32b"
103 Default hash method for dynamic response payloads to generate an ETag.
107 The http extension registers the ```http.*``` namespace for its stream filters. Provided stream filters are:
109 * http.chunked_decode
110 Decode a stream encoded with chunked transfer encoding.
111 * http.chunked_encode
112 Encode a stream with chunked transfer encoding.
114 Decode a stream encoded with deflate/zlib/gzip encoding.
116 Encode a stream with deflate/zlib/gzip encoding.
121 Documentation is available at https://mdref.m6w6.name/http