more install instructions
[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 Install on Debian: `apt-get install zlib1g-dev`
29
30
31 #### Optional system libraries:
32
33 The following system libraries are optional and provide additional features:
34
35 =libidn=
36 Provides IDNA support in URLs.
37 Install on Debian: `apt-get install libidn11-dev`
38
39 =libcurl=
40 Provides HTTP request functionality.
41 Install on Debian: `apt-get install libcurl4-openssl-dev`
42 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'.
43
44 =libevent=
45 Eventloop support for the HTTP client.
46 Install on Debian: `apt-get install libevent-dev`
47
48 ### PHP extensions:
49
50 This extension unconditionally depends on the pre-loaded presence of the following PHP extensions:
51
52 * raphf
53 * propro
54 * spl
55
56
57 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:
58
59 * hash
60 * iconv
61 * json
62
63 Please ensure that all extension on which pecl/http depends, are loaded before it, e.g in your `php.ini`:
64
65 ; obligatory deps
66 extension = raphf.so
67 extension = propro.so
68
69 ; if shared deps were enabled
70 extension = hash.so
71 extension = iconv.so
72 extension = json.so
73
74 ; finally load pecl/http
75 extension = http.so
76
77 ## Conflicts:
78
79 pecl/http-v2 conflicts with the following extensions:
80
81 * http-v1
82 * event (only until <= 2.0.3)
83
84 ## INI Directives:
85
86 * http.etag.mode = "crc32b"
87 Default hash method for dynamic response payloads to generate an ETag.
88
89 ## Stream Filters:
90
91 The http extension registers the ```http.*``` namespace for its stream filters. Provided stream filters are:
92
93 * http.chunked_decode
94 Decode a stream encoded with chunked transfer encoding.
95 * http.chunked_encode
96 Encode a stream with chunked transfer encoding.
97 * http.inflate
98 Decode a stream encoded with deflate/zlib/gzip encoding.
99 * http.deflate
100 Encode a stream with deflate/zlib/gzip encoding.
101
102 ## Changelog:
103
104 Version | Change
105 --------|-------
106 2.0.4 | Dropped the pecl/event conflict.