mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 18:14:44 +02:00
refactor: return proper response object (#4169)
This commit is contained in:
parent
aa3989873c
commit
891c8979a3
28 changed files with 69 additions and 84 deletions
|
@ -511,11 +511,11 @@ class VkBridge extends BridgeAbstract
|
|||
while ($redirects < 2) {
|
||||
$response = getContents($uri, $httpHeaders, [CURLOPT_FOLLOWLOCATION => false], true);
|
||||
|
||||
if (in_array($response['code'], [200, 304])) {
|
||||
return $response['content'];
|
||||
if (in_array($response->getCode(), [200, 304])) {
|
||||
return $response->getBody();
|
||||
}
|
||||
|
||||
$headers = $response['headers'];
|
||||
$headers = $response->getHeaders();
|
||||
$uri = urljoin(self::URI, $headers['location'][0]);
|
||||
|
||||
if (str_contains($uri, '/429.html')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue