From 3c0996abe13e33d32c62ef202b046edbda5b406d Mon Sep 17 00:00:00 2001 From: gggeek Date: Sat, 26 Nov 2022 09:56:26 +0000 Subject: [PATCH] comments --- src/Helper/Http.php | 4 ++++ src/Request.php | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/Helper/Http.php b/src/Helper/Http.php index 7d6cb48e..6583d064 100644 --- a/src/Helper/Http.php +++ b/src/Helper/Http.php @@ -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) { diff --git a/src/Request.php b/src/Request.php index e3560081..7eb124ff 100644 --- a/src/Request.php +++ b/src/Request.php @@ -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) { -- 2.47.0