mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-08 17:46:34 +02:00
refactor: return proper response object (#4169)
This commit is contained in:
@@ -191,15 +191,12 @@ HEREDOC;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract the cookies obtained from the URL
|
||||
* @return array the array containing the cookies set by the URL
|
||||
*/
|
||||
private function getCookiesHeaderValue($url)
|
||||
{
|
||||
$response = getContents($url, [], [], true);
|
||||
$setCookieHeaders = $response['headers']['set-cookie'] ?? [];
|
||||
$setCookieHeaders = $response->getHeader('set-cookie', true);
|
||||
$cookies = array_map(fn($c): string => explode(';', $c)[0], $setCookieHeaders);
|
||||
|
||||
return implode('; ', $cookies);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user