X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=http.md;h=0a1c87d91ac4c27730bbd18b81e18be5b67495c1;hb=8ade9952b52559ecd61d316aaa1923cb715e2085;hp=6175e26c14ad76f980ed602ba08a95527161d260;hpb=fb2ab0c8596f274acb2a3aea76f97c895ee2af34;p=mdref%2Fmdref-http diff --git a/http.md b/http.md index 6175e26..0a1c87d 100644 --- a/http.md +++ b/http.md @@ -1,5 +1,106 @@ -# namespace http +# pecl/http v2 -This is pecl_http-v2. +## About: -This documentation is work-in-progress. +Extended HTTP support. Again. + +* Introduces the http namespace. +* PHP stream based message bodies. +* Encapsulated env request/response. +* Modular client support. + +## Installation: + +This extension is hosted at [PECL](http://pecl.php.net) and can be installed with [PEAR](http://pear.php.net)'s pecl command: + + # pecl install pecl_http + +## Dependencies: + +pecl/http depends on a number of system libraries and PHP extensions for special features. + +#### Required system libraries: + +The following system libraries are required to build this extension: + +=zlib= + Provides gzip/zlib/deflate encoding. + Install on Debian: `apt-get install zlib1g-dev` + + +#### Optional system libraries: + +The following system libraries are optional and provide additional features: + +=libidn= + Provides IDNA support in URLs. + Install on Debian: `apt-get install libidn11-dev` + +=libcurl= + Provides HTTP request functionality. + Install on Debian: `apt-get install libcurl4-openssl-dev` + 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'. + +=libevent= + Eventloop support for the HTTP client. + Install on Debian: `apt-get install libevent-dev` + +### PHP extensions: + +This extension unconditionally depends on the pre-loaded presence of the following PHP extensions: + +* raphf +* propro +* spl + + +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: + +* hash +* iconv +* json + +Please ensure that all extension on which pecl/http depends, are loaded before it, e.g in your `php.ini`: + + ; obligatory deps + extension = raphf.so + extension = propro.so + + ; if shared deps were enabled + extension = hash.so + extension = iconv.so + extension = json.so + + ; finally load pecl/http + extension = http.so + +## Conflicts: + +pecl/http-v2 conflicts with the following extensions: + +* http-v1 +* event (only until <= 2.0.3) + +## INI Directives: + +* http.etag.mode = "crc32b" + Default hash method for dynamic response payloads to generate an ETag. + +## Stream Filters: + +The http extension registers the ```http.*``` namespace for its stream filters. Provided stream filters are: + +* http.chunked_decode + Decode a stream encoded with chunked transfer encoding. +* http.chunked_encode + Encode a stream with chunked transfer encoding. +* http.inflate + Decode a stream encoded with deflate/zlib/gzip encoding. +* http.deflate + Encode a stream with deflate/zlib/gzip encoding. + +## Changelog: + +Version | Change +--------|------- +2.0.4 | Dropped the pecl/event conflict.