I am using cakephp 3.x . I have added my custom panel in debug-kit show my custom data here. This panel will show the URLs - to which HTTP client send the request.
Any Idea to proceed??
If i need to added any callback function or any additional event to get URL from Cake\Network\Http\Adapter\Stream and log it to my custom debug panel. I am working on debug panel first-time so no can i show HTTP Client URL to debug panel.
Only i have found this, where i can track the requested URL as $url in below code:
/**
* Helper method for doing non-GET requests.
*
* @param string $method HTTP method.
* @param string $url URL to request.
* @param mixed $data The request body.
* @param array $options The options to use. Contains auth, proxy etc.
*
* @return \Cake\Network\Http\Response
*/
protected function _doRequest($method, $url, $data, $options)
{ debug(urldecode($url));
$request = $this->_createRequest($method, $url, $data, $options);
$time = microtime();
$timerKey = 'debug_http.call.' . $url . '.' . $time;
if (Configure::read('debug')) {
DebugTimer::start($timerKey, $method . ' ' . $url);
}
$response = $this->send($request, $options);
if (Configure::read('debug')) {
DebugTimer::stop($timerKey);
ClientCallPanel::addCall($request, $response, DebugTimer::elapsedTime($timerKey));
}
return $response;
}
Waiting for experts' response...