comments
authorgggeek <giunta.gaetano@gmail.com>
Sat, 26 Nov 2022 09:56:26 +0000 (09:56 +0000)
committergggeek <giunta.gaetano@gmail.com>
Sat, 26 Nov 2022 09:56:26 +0000 (09:56 +0000)
src/Helper/Http.php
src/Request.php

index 7d6cb48..6583d06 100644 (file)
@@ -66,9 +66,13 @@ class Http
      *
      * @param string $data the http response, headers and body. It will be stripped of headers
      * @param bool $headersProcessed when true, we assume that response inflating and dechunking has been already carried out
+     * @param int $debug when != 0, logs to screen messages detailing info about the parsed data
      *
      * @return array with keys 'headers', 'cookies', 'raw_data' and 'status_code'
      * @throws HttpException
+     *
+     * @todo if $debug is 0, we could avoid populating 'raw_data' and 'headers' in the returned value - even better, have
+     *       2 debug levels
      */
     public function parseResponseHeaders(&$data, $headersProcessed = false, $debug=0)
     {
index e356008..7eb124f 100644 (file)
@@ -238,6 +238,8 @@ class Request
      * @return Response
      *
      * @todo parsing Responses is not really the responsibility of the Request class. Maybe of the Client...
+     * @todo what about only populating 'raw_data' and 'headers' in httpResponse when debug mode is on? Even better, have
+     *       3 debug levels: data only, echo messages, echo more messages
      */
     public function parseResponse($data = '', $headersProcessed = false, $returnType = XMLParser::RETURN_XMLRPCVALS)
     {