use Friendica\DI;
use Friendica\Model\GContact;
use Friendica\Model\GServer;
-use Friendica\Network\HTTPRequest;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Strings;
Logger::log('load: ' . $url, Logger::DEBUG);
- $fetchresult = HTTPRequest::fetchUrlFull($url);
+ $fetchresult = DI::httpRequest()->fetchFull($url);
$s = $fetchresult->getBody();
Logger::log('load: returns ' . $s, Logger::DATA);
*/
private static function fetchServerlist($poco)
{
- $curlResult = HTTPRequest::curl($poco . "/@server");
+ $curlResult = DI::httpRequest()->get($poco . "/@server");
if (!$curlResult->isSuccess()) {
return;
Logger::info("Fetch all users from the server " . $server["url"]);
- $curlResult = HTTPRequest::curl($url);
+ $curlResult = DI::httpRequest()->get($url);
if ($curlResult->isSuccess() && !empty($curlResult->getBody())) {
$data = json_decode($curlResult->getBody(), true);
$success = false;
- $curlResult = HTTPRequest::curl($url);
+ $curlResult = DI::httpRequest()->get($url);
if ($curlResult->isSuccess() && !empty($curlResult->getBody())) {
Logger::info("Fetch all global contacts from the server " . $server["nurl"]);
// Fetch all contacts from a given user from the other server
$url = $server['poco'] . '/' . $username . '/?fields=displayName,urls,photos,updated,network,aboutMe,currentLocation,tags,contactType,generation';
- $curlResult = HTTPRequest::curl($url);
+ $curlResult = DI::httpRequest()->get($url);
if ($curlResult->isSuccess()) {
$data = json_decode($curlResult->getBody(), true);