X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http.md;h=8dac0c1173b6ce3be1e98c36d59b9665783fcb2a;hb=72d6bdbb1c40afb579687e04f9b2f3e690f5a489;hp=a2d427b816702d57235aa9133b08d4ad24970373;hpb=df8a4af106ea7a1f64eb2f0d99883b6e182e720b;p=mdref%2Fmdref-http diff --git a/http.md b/http.md index a2d427b..8dac0c1 100644 --- a/http.md +++ b/http.md @@ -1,26 +1,56 @@ # pecl/http v2 -> **Note:** This documentation is work-in-progress. - ## About: -Extended HTTP support. Again. Keep in mind that it's got the major version 2, because it's incompatible with pecl_http v1. +Extended HTTP support. Again. * Introduces the http namespace. -* Message bodies have been remodeled to use PHP temporary streams instead of in-memory buffers. -* The utterly misunderstood HttpResponse class has been reimplemented as http\Env\Response inheriting http\Message. -* Currently, there's only one Exception class left, http\Exception. -* Errors triggered by the extension can be configured statically by http\Object::$defaultErrorHandling or inherited http\Object->errorHandling. -* The request ecosystem has been modularized to support different libraries, though for the moment only libcurl is supported. +* PHP stream based message bodies. +* Encapsulated env request/response. +* Modular client support. ## Installation: -This extension is hosted at PECL () and can be installed eith PEAR's pecl command: +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: + +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 requires on the pre-loaded presence of the following extensions, as long as they were available at build time: + +* hash +* iconv +* json + +## Conflicts: + +pecl/http-v2 conflicts with the following extensions: + +* http-v1 +* event + ## 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.