mirror of
https://github.com/friendica/friendica
synced 2025-04-22 09:10:10 +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
|
@ -31,12 +31,10 @@ use Friendica\Database\DBStructure;
|
|||
use Friendica\DI;
|
||||
use Friendica\Model\Register;
|
||||
use Friendica\Module\BaseAdmin;
|
||||
use Friendica\Module\Update\Profile;
|
||||
use Friendica\Network\HTTPException\InternalServerErrorException;
|
||||
use Friendica\Render\FriendicaSmarty;
|
||||
use Friendica\Network\HTTPRequest;
|
||||
use Friendica\Util\ConfigFileLoader;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Network;
|
||||
|
||||
class Summary extends BaseAdmin
|
||||
{
|
||||
|
@ -249,7 +247,7 @@ class Summary extends BaseAdmin
|
|||
private static function checkSelfHostMeta()
|
||||
{
|
||||
// Fetch the host-meta to check if this really is a vital server
|
||||
return Network::curl(DI::baseUrl()->get() . '/.well-known/host-meta')->isSuccess();
|
||||
return HTTPRequest::curl(DI::baseUrl()->get() . '/.well-known/host-meta')->isSuccess();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,8 +25,8 @@ use Friendica\BaseModule;
|
|||
use Friendica\Core\Renderer;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model;
|
||||
use Friendica\Network\HTTPRequest;
|
||||
use Friendica\Protocol;
|
||||
use Friendica\Util\Network;
|
||||
|
||||
/**
|
||||
* Tests a given feed of a contact
|
||||
|
@ -49,7 +49,7 @@ class Feed extends BaseModule
|
|||
|
||||
$contact = Model\Contact::getByURLForUser($url, local_user(), false);
|
||||
|
||||
$xml = Network::fetchUrl($contact['poll']);
|
||||
$xml = HTTPRequest::fetchUrl($contact['poll']);
|
||||
|
||||
$import_result = Protocol\Feed::import($xml);
|
||||
|
||||
|
|
|
@ -27,8 +27,8 @@ use Friendica\Core\System;
|
|||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Network\HTTPRequest;
|
||||
use Friendica\Util\HTTPSignature;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
/**
|
||||
|
@ -101,7 +101,7 @@ class Magic extends BaseModule
|
|||
);
|
||||
|
||||
// Try to get an authentication token from the other instance.
|
||||
$curlResult = Network::curl($basepath . '/owa', false, ['headers' => $headers]);
|
||||
$curlResult = HTTPRequest::curl($basepath . '/owa', false, ['headers' => $headers]);
|
||||
|
||||
if ($curlResult->isSuccess()) {
|
||||
$j = json_decode($curlResult->getBody(), true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue