Move post/curl/fetchUrl/fetchUrlFull to own class "Network\HTTPRequest"

This commit is contained in:
nupplaPhil 2020-03-04 22:07:05 +01:00 committed by Hypolite Petovan
parent 2889d59b83
commit 5344efef71
43 changed files with 528 additions and 485 deletions

View file

@ -21,7 +21,7 @@
namespace Friendica\Core;
use Friendica\Util\Network;
use Friendica\Network\HTTPRequest;
/**
* Manage compatibility with federated networks
@ -123,7 +123,7 @@ class Protocol
if (preg_match('=https?://(.*)/user/(.*)=ism', $profile_url, $matches)) {
$statusnet_host = $matches[1];
$statusnet_user = $matches[2];
$UserData = Network::fetchUrl('http://' . $statusnet_host . '/api/users/show.json?user_id=' . $statusnet_user);
$UserData = HTTPRequest::fetchUrl('http://' . $statusnet_host . '/api/users/show.json?user_id=' . $statusnet_user);
$user = json_decode($UserData);
if ($user) {
$matches[2] = $user->screen_name;