2.4.0 notes
[mdref/mdref-http] / http.md
1 # pecl/http v2
2
3 ## About:
4
5 Extended HTTP support. Again.
6
7 * Introduces the http namespace.
8 * PHP stream based message bodies.
9 * Encapsulated env request/response.
10 * Modular client support.
11
12 ## Installation:
13
14 This extension is hosted at [PECL](http://pecl.php.net) and can be installed with [PEAR](http://pear.php.net)'s pecl command:
15
16 # pecl install pecl_http
17
18 ## Dependencies:
19
20 pecl/http depends on a number of system libraries and PHP extensions for special features.
21
22 #### Required system libraries:
23
24 The following system libraries are required to build this extension:
25
26 =zlib=
27 Provides gzip/zlib/deflate encoding.
28 Minimum version: 1.2.0.4
29 Install on Debian: `apt-get install zlib1g-dev`
30
31
32 #### Optional system libraries:
33
34 The following system libraries are optional and provide additional features:
35
36 =libidn=
37 Provides IDNA support in URLs.
38 Minimum version: none
39 Install on Debian: `apt-get install libidn11-dev`
40
41 =libcurl=
42 Provides HTTP request functionality.
43 Minimum version: 7.18.2
44 Install on Debian: `apt-get install libcurl4-openssl-dev`
45 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'.
46
47 =libevent=
48 Eventloop support for the HTTP client.
49 Minimum version: none
50 Install on Debian: `apt-get install libevent-dev`
51
52 ### PHP extensions:
53
54 This extension unconditionally depends on the pre-loaded presence of the following PHP extensions:
55
56 * raphf
57 * propro
58 * spl
59
60
61 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:
62
63 * hash
64 * iconv
65 * json (only until < 2.4.0)
66
67 Please ensure that all extension on which pecl/http depends, are loaded before it, e.g in your `php.ini`:
68
69 ; obligatory deps
70 extension = raphf.so
71 extension = propro.so
72
73 ; if shared deps were enabled
74 extension = hash.so
75 extension = iconv.so
76 extension = json.so
77
78 ; finally load pecl/http
79 extension = http.so
80
81 ## Conflicts:
82
83 pecl/http-v2 conflicts with the following extensions:
84
85 * http-v1
86 * event (only until <= 2.0.3)
87
88 ## INI Directives:
89
90 * http.etag.mode = "crc32b"
91 Default hash method for dynamic response payloads to generate an ETag.
92
93 ## Stream Filters:
94
95 The http extension registers the ```http.*``` namespace for its stream filters. Provided stream filters are:
96
97 * http.chunked_decode
98 Decode a stream encoded with chunked transfer encoding.
99 * http.chunked_encode
100 Encode a stream with chunked transfer encoding.
101 * http.inflate
102 Decode a stream encoded with deflate/zlib/gzip encoding.
103 * http.deflate
104 Encode a stream with deflate/zlib/gzip encoding.
105
106 ## Changelog:
107
108 Version | Change
109 --------|-------
110 2.0.4 | Dropped the pecl/event conflict.
111 2.4.0 | Dropped the ext/json dependency.