From: Michael Wallner Date: Tue, 21 Jun 2016 06:50:14 +0000 (+0200) Subject: Add http\Client::setDebug(callable $debug) and constants X-Git-Tag: RELEASE_2_6_0_BETA1~10 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=1ac722a1169ffe0f804f8d30a79c2f270d0d7999;hp=1ac722a1169ffe0f804f8d30a79c2f270d0d7999 Add http\Client::setDebug(callable $debug) and constants Returns: * http\Client, self Params: * callable $debug as function(http\Client $c, http\Client\Request $r, int $type, string $data) Added constants (used for the $type bitmask parameter of the callback): * http\Client::DEBUG_INFO (informational text) * http\Client::DEBUG_IN (received data) * http\Client::DEBUG_OUT (sent data) * http\Client::DEBUG_HEADER (headers) * http\Client::DEBUG_BODY (body) * http\Client::DEBUG_SSL (SSL data) E.g. incoming headers would have the bitmask (http\Client::DEBUG_IN|http\Client::DEBUG_HEADER) set in the $type parameter. Messages of type http\Client::DEBUG_INFO contain human readable text like "Proxy CONNECT connection closed\n". ---