$hub_callback = rtrim($hub_callback, ' ?&#');
$separator = parse_url($hub_callback, PHP_URL_QUERY) === null ? '?' : '&';
- $fetchResult = HTTPRequest::fetchUrlFull($hub_callback . $separator . $params);
+ $fetchResult = DI::httpRequest()->fetchUrlFull($hub_callback . $separator . $params);
$body = $fetchResult->getBody();
$ret = $fetchResult->getReturnCode();
$help = "";
$error_msg = "";
if (function_exists('curl_init')) {
- $fetchResult = HTTPRequest::fetchUrlFull($baseurl . "/install/testrewrite");
+ $fetchResult = DI::httpRequest()->fetchUrlFull($baseurl . "/install/testrewrite");
$url = Strings::normaliseLink($baseurl . "/install/testrewrite");
if ($fetchResult->getReturnCode() != 204) {
- $fetchResult = HTTPRequest::fetchUrlFull($url);
+ $fetchResult = DI::httpRequest()->fetchUrlFull($url);
}
if ($fetchResult->getReturnCode() != 204) {
* @return CurlResult With all relevant information, 'body' contains the actual fetched content.
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
- public static function fetchUrlFull(string $url, bool $binary = false, int $timeout = 0, string $accept_content = '', string $cookiejar = '', int &$redirects = 0)
+ public function fetchUrlFull(string $url, bool $binary = false, int $timeout = 0, string $accept_content = '', string $cookiejar = '', int &$redirects = 0)
{
- return self::curl(
+ return $this->curl(
$url,
$binary,
[
Logger::log('load: ' . $url, Logger::DEBUG);
- $fetchresult = HTTPRequest::fetchUrlFull($url);
+ $fetchresult = DI::httpRequest()->fetchUrlFull($url);
$s = $fetchresult->getBody();
Logger::log('load: returns ' . $s, Logger::DATA);