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