1
0
Fork 0

Rename "HTTPRequest::curl()" to HTTPRequest::get()

This commit is contained in:
nupplaPhil 2020-03-04 22:35:09 +01:00 committed by Hypolite Petovan
commit 7029012f27
22 changed files with 66 additions and 64 deletions

View file

@ -54,7 +54,7 @@ function ostatus_subscribe_content(App $a)
$api = $contact['baseurl'] . '/api/';
// Fetching friends
$curlResult = DI::httpRequest()->curl($api . 'statuses/friends.json?screen_name=' . $contact['nick']);
$curlResult = DI::httpRequest()->get($api . 'statuses/friends.json?screen_name=' . $contact['nick']);
if (!$curlResult->isSuccess()) {
DI::pConfig()->delete($uid, 'ostatus', 'legacy_contact');

View file

@ -28,6 +28,7 @@ use Friendica\Content\PageInfo;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\System;
use Friendica\DI;
use Friendica\Util\ParseUrl;
use Friendica\Util\Strings;
@ -84,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 = DI::httpRequest()->curl($url, false, ['novalidate' => true, 'nobody' => true]);
$curlResponse = DI::httpRequest()->get($url, false, ['novalidate' => true, 'nobody' => true]);
if ($curlResponse->isSuccess()) {
// Convert the header fields into an array

View file

@ -170,7 +170,7 @@ function redir_magic($a, $cid, $url)
}
// Test for magic auth on the target system
$serverret = DI::httpRequest()->curl($basepath . '/magic');
$serverret = DI::httpRequest()->get($basepath . '/magic');
if ($serverret->isSuccess()) {
$separator = strpos($target_url, '?') ? '&' : '?';
$target_url .= $separator . 'zrl=' . urlencode($visitor) . '&addr=' . urlencode($contact_url);