cakephp 3.x를 사용하고 있습니다. 내 사용자 정의 패널을 디버그 키트에 추가하여 사용자 정의 데이터를 여기에 표시했습니다. 이 패널에는 HTTP 클라이언트가 요청을 보내는 URL이 표시됩니다.Cakephp3 - 디버그 패널에 HTTP 클라이언트 요청 URL 표시
어떤 아이디어를 진행 하시겠습니까 ??
콜백 함수 나 추가 이벤트를 추가해야 Cake \ Network \ Http \ Adapter \ Stream에서 URL을 가져와 내 사용자 정의 디버그 패널에 기록해야합니다. 디버그 패널에서 처음으로 작업 중이므로 디버깅 패널에 HTTP 클라이언트 URL을 표시 할 수 없습니다. ... 전문가의 응답을 기다리는
/**
* 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;
}
내장 방법에