mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-30 21:30:14 +02:00
refactor: extract CurlHttpClient (#3532)
* refactor: extract CurlHttpClient * refactor * interface
This commit is contained in:
@@ -14,7 +14,8 @@ while ($next) { /* Collect all contributors */
|
||||
'Content-Type' => 'application/json',
|
||||
'User-Agent' => 'RSS-Bridge',
|
||||
];
|
||||
$result = _http_request($url, ['headers' => $headers]);
|
||||
$httpClient = new CurlHttpClient();
|
||||
$result = $httpClient->request($url, ['headers' => $headers]);
|
||||
|
||||
foreach (json_decode($result['body']) as $contributor) {
|
||||
$contributors[] = $contributor;
|
||||
|
Reference in New Issue
Block a user