mirror of
https://github.com/friendica/friendica
synced 2025-04-27 15:10:11 +00:00
Make "HTTPRequest::post" dynamic
This commit is contained in:
parent
2973ed6448
commit
8793096c16
10 changed files with 25 additions and 33 deletions
|
@ -43,7 +43,6 @@ use Friendica\Model\Post\Category;
|
|||
use Friendica\Model\Profile;
|
||||
use Friendica\Model\Tag;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Network\HTTPRequest;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Util\Crypto;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
@ -1344,7 +1343,7 @@ class DFRN
|
|||
|
||||
Logger::debug('dfrn_deliver', ['post' => $postvars]);
|
||||
|
||||
$postResult = HTTPRequest::post($contact['notify'], $postvars);
|
||||
$postResult = DI::httpRequest()->post($contact['notify'], $postvars);
|
||||
|
||||
$xml = $postResult->getBody();
|
||||
|
||||
|
@ -1441,7 +1440,7 @@ class DFRN
|
|||
|
||||
$content_type = ($public_batch ? "application/magic-envelope+xml" : "application/json");
|
||||
|
||||
$postResult = HTTPRequest::post($dest_url, $envelope, ["Content-Type: " . $content_type]);
|
||||
$postResult = DI::httpRequest()->post($dest_url, $envelope, ["Content-Type: " . $content_type]);
|
||||
$xml = $postResult->getBody();
|
||||
|
||||
$curl_stat = $postResult->getReturnCode();
|
||||
|
|
|
@ -3261,7 +3261,7 @@ class Diaspora
|
|||
if (!intval(DI::config()->get("system", "diaspora_test"))) {
|
||||
$content_type = (($public_batch) ? "application/magic-envelope+xml" : "application/json");
|
||||
|
||||
$postResult = HTTPRequest::post($dest_url . "/", $envelope, ["Content-Type: " . $content_type]);
|
||||
$postResult = DI::httpRequest()->post($dest_url . "/", $envelope, ["Content-Type: " . $content_type]);
|
||||
$return_code = $postResult->getReturnCode();
|
||||
} else {
|
||||
Logger::log("test_mode");
|
||||
|
|
|
@ -155,7 +155,7 @@ class Salmon
|
|||
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
|
||||
|
||||
// slap them
|
||||
$postResult = HTTPRequest::post($url, $salmon, [
|
||||
$postResult = DI::httpRequest()->post($url, $salmon, [
|
||||
'Content-type: application/magic-envelope+xml',
|
||||
'Content-length: ' . strlen($salmon)
|
||||
]);
|
||||
|
@ -180,7 +180,7 @@ class Salmon
|
|||
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
|
||||
|
||||
// slap them
|
||||
$postResult = HTTPRequest::post($url, $salmon, [
|
||||
$postResult = DI::httpRequest()->post($url, $salmon, [
|
||||
'Content-type: application/magic-envelope+xml',
|
||||
'Content-length: ' . strlen($salmon)
|
||||
]);
|
||||
|
@ -203,7 +203,7 @@ class Salmon
|
|||
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
|
||||
|
||||
// slap them
|
||||
$postResult = HTTPRequest::post($url, $salmon, [
|
||||
$postResult = DI::httpRequest()->post($url, $salmon, [
|
||||
'Content-type: application/magic-envelope+xml',
|
||||
'Content-length: ' . strlen($salmon)]);
|
||||
$return_code = $postResult->getReturnCode();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue