Fix redirect logging
This commit is contained in:
parent
26401e88b8
commit
1995feff61
|
@ -197,12 +197,14 @@ class HTTPRequest implements IHTTPRequest
|
|||
$curlOptions[CURLOPT_BINARYTRANSFER] = 1;
|
||||
}
|
||||
|
||||
$logger = $this->logger;
|
||||
|
||||
$onRedirect = function(
|
||||
RequestInterface $request,
|
||||
ResponseInterface $response,
|
||||
UriInterface $uri
|
||||
) {
|
||||
$this->logger->notice('Curl redirect.', ['url' => $request->getUri(), 'to' => $uri]);
|
||||
) use ($logger) {
|
||||
$logger->notice('Curl redirect.', ['url' => $request->getUri(), 'to' => $uri]);
|
||||
};
|
||||
|
||||
$onHeaders = function (ResponseInterface $response) use ($opts) {
|
||||
|
|
Loading…
Reference in a new issue