mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-09 01:56:39 +02:00
fix: rewrite and improve caching (#3594)
This commit is contained in:
@@ -15,14 +15,17 @@ while ($next) { /* Collect all contributors */
|
||||
'User-Agent' => 'RSS-Bridge',
|
||||
];
|
||||
$httpClient = new CurlHttpClient();
|
||||
$result = $httpClient->request($url, ['headers' => $headers]);
|
||||
$response = $httpClient->request($url, ['headers' => $headers]);
|
||||
|
||||
foreach (json_decode($result['body']) as $contributor) {
|
||||
$json = $response->getBody();
|
||||
$json_decode = Json::decode($json, false);
|
||||
foreach ($json_decode as $contributor) {
|
||||
$contributors[] = $contributor;
|
||||
}
|
||||
|
||||
// Extract links to "next", "last", etc...
|
||||
$links = explode(',', $result['headers']['link'][0]);
|
||||
$link1 = $response->getHeader('link');
|
||||
$links = explode(',', $link1);
|
||||
$next = false;
|
||||
|
||||
// Check if there is a link with 'rel="next"'
|
||||
|
Reference in New Issue
Block a user