mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-03 09:35:57 +02:00
[refactoring] replace direct use of curl with getContents (#3723)
+ some fixed warnings
This commit is contained in:
parent
41df17bc46
commit
69da0dd583
6 changed files with 24 additions and 52 deletions
|
@ -52,7 +52,11 @@ function getContents(
|
|||
$config['proxy'] = Configuration::getConfig('proxy', 'url');
|
||||
}
|
||||
|
||||
$cacheKey = 'server_' . $url;
|
||||
$requestBodyHash = null;
|
||||
if (isset($curlOptions[CURLOPT_POSTFIELDS])) {
|
||||
$requestBodyHash = md5(json_encode($curlOptions[CURLOPT_POSTFIELDS]));
|
||||
}
|
||||
$cacheKey = implode('_', ['server', $url, $requestBodyHash]);
|
||||
|
||||
/** @var Response $cachedResponse */
|
||||
$cachedResponse = $cache->get($cacheKey);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue