mirror of
https://github.com/friendica/friendica
synced 2025-04-27 13:50:12 +00:00
Curl Response Refactoring
- extended Curl to parse Curl Response - refactored Network::curl() - replaced every Network::curl() execution with the new Curl container
This commit is contained in:
parent
904fee3bed
commit
2dec8895a9
20 changed files with 466 additions and 382 deletions
|
@ -58,12 +58,12 @@ class ActivityPub
|
|||
*/
|
||||
public static function fetchContent($url)
|
||||
{
|
||||
$ret = Network::curl($url, false, $redirects, ['accept_content' => 'application/activity+json, application/ld+json']);
|
||||
if (!$ret['success'] || empty($ret['body'])) {
|
||||
$curlResult = Network::curl($url, false, $redirects, ['accept_content' => 'application/activity+json, application/ld+json']);
|
||||
if (!$curlResult->isSuccess() || empty($curlResult->getBody())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return json_decode($ret['body'], true);
|
||||
return json_decode($curlResult->getBody(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue