mirror of
https://github.com/friendica/friendica
synced 2025-04-24 09:50:11 +00:00
Move post/curl/fetchUrl/fetchUrlFull to own class "Network\HTTPRequest"
This commit is contained in:
parent
2889d59b83
commit
5344efef71
43 changed files with 528 additions and 485 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue