Merge pull request #8911 from MrPetovan/task/curl_DI

Introduce "HTTPRequest" class
This commit is contained in:
Michael Vogel 2020-07-25 09:50:20 +02:00 committed by GitHub
commit 398e65d66b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 765 additions and 647 deletions

View file

@ -23,7 +23,6 @@ use Friendica\App;
use Friendica\Core\Renderer;
use Friendica\DI;
use Friendica\Module\Security\Login;
use Friendica\Util\Network;
use Friendica\Util\Strings;
function oexchange_init(App $a) {
@ -57,7 +56,7 @@ function oexchange_content(App $a) {
$tags = ((!empty($_REQUEST['tags']))
? '&tags=' . urlencode(Strings::escapeTags(trim($_REQUEST['tags']))) : '');
$s = Network::fetchUrl(DI::baseUrl() . '/parse_url?url=' . $url . $title . $description . $tags);
$s = DI::httpRequest()->fetch(DI::baseUrl() . '/parse_url?url=' . $url . $title . $description . $tags);
if (!strlen($s)) {
return;