mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 01:55:21 +02:00
fix: rewrite and improve caching (#3594)
This commit is contained in:
parent
a786bbd4e0
commit
4b9f6f7e53
45 changed files with 993 additions and 1169 deletions
|
@ -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"'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue