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
commit 5344efef71
43 changed files with 528 additions and 485 deletions

View file

@ -28,7 +28,7 @@ use Friendica\Content\PageInfo;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\System;
use Friendica\Util\Network;
use Friendica\Network\HTTPRequest;
use Friendica\Util\ParseUrl;
use Friendica\Util\Strings;
@ -85,7 +85,7 @@ function parse_url_content(App $a)
// Check if the URL is an image, video or audio file. If so format
// the URL with the corresponding BBCode media tag
// Fetch the header of the URL
$curlResponse = Network::curl($url, false, ['novalidate' => true, 'nobody' => true]);
$curlResponse = HTTPRequest::curl($url, false, ['novalidate' => true, 'nobody' => true]);
if ($curlResponse->isSuccess()) {
// Convert the header fields into an array