1
0
Fork 0

Make "HTTPRequest::post" dynamic

This commit is contained in:
nupplaPhil 2020-03-04 22:18:28 +01:00 committed by Hypolite Petovan
commit 8793096c16
10 changed files with 25 additions and 33 deletions

View file

@ -42,7 +42,6 @@ use Friendica\Model\Contact;
use Friendica\Model\Group;
use Friendica\Model\Notify\Type;
use Friendica\Model\User;
use Friendica\Network\HTTPRequest;
use Friendica\Protocol\Activity;
use Friendica\Util\Crypto;
use Friendica\Util\DateTimeFormat;
@ -224,7 +223,7 @@ function dfrn_confirm_post(App $a, $handsfree = null)
*
*/
$res = HTTPRequest::post($dfrn_confirm, $params, [], 120)->getBody();
$res = DI::httpRequest()->post($dfrn_confirm, $params, [], 120)->getBody();
Logger::log(' Confirm: received data: ' . $res, Logger::DATA);

View file

@ -507,7 +507,7 @@ function dfrn_poll_content(App $a)
. '&sec=' . $sec
);
} else {
$s = HTTPRequest::post($r[0]['poll'], [
$s = DI::httpRequest()->post($r[0]['poll'], [
'dfrn_id' => $encrypted_id,
'type' => 'profile-check',
'dfrn_version' => DFRN_PROTOCOL_VERSION,

View file

@ -27,7 +27,6 @@ use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Contact;
use Friendica\Model\Profile;
use Friendica\Network\HTTPRequest;
use Friendica\Util\Proxy as ProxyUtils;
/**
@ -76,7 +75,7 @@ function match_content(App $a)
$host = DI::baseUrl();
}
$msearch_json = HTTPRequest::post($host . '/msearch', $params)->getBody();
$msearch_json = DI::httpRequest()->post($host . '/msearch', $params)->getBody();
$msearch = json_decode($msearch_json);