mirror of
https://github.com/friendica/friendica
synced 2025-05-11 05:44:10 +02:00
Move post/curl/fetchUrl/fetchUrlFull to own class "Network\HTTPRequest"
This commit is contained in:
parent
2889d59b83
commit
5344efef71
43 changed files with 528 additions and 485 deletions
|
@ -41,6 +41,7 @@ use Friendica\Model\Mail;
|
|||
use Friendica\Model\Post;
|
||||
use Friendica\Model\Tag;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Network\HTTPRequest;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Util\Crypto;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
@ -1379,7 +1380,7 @@ class Diaspora
|
|||
|
||||
Logger::log("Fetch post from ".$source_url, Logger::DEBUG);
|
||||
|
||||
$envelope = Network::fetchUrl($source_url);
|
||||
$envelope = HTTPRequest::fetchUrl($source_url);
|
||||
if ($envelope) {
|
||||
Logger::log("Envelope was fetched.", Logger::DEBUG);
|
||||
$x = self::verifyMagicEnvelope($envelope);
|
||||
|
@ -3260,7 +3261,7 @@ class Diaspora
|
|||
if (!intval(DI::config()->get("system", "diaspora_test"))) {
|
||||
$content_type = (($public_batch) ? "application/magic-envelope+xml" : "application/json");
|
||||
|
||||
$postResult = Network::post($dest_url."/", $envelope, ["Content-Type: ".$content_type]);
|
||||
$postResult = HTTPRequest::post($dest_url . "/", $envelope, ["Content-Type: " . $content_type]);
|
||||
$return_code = $postResult->getReturnCode();
|
||||
} else {
|
||||
Logger::log("test_mode");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue