mirror of
https://github.com/friendica/friendica
synced 2025-04-27 09:10:12 +00: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
|
@ -22,9 +22,9 @@
|
|||
namespace Friendica\Protocol;
|
||||
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Network\HTTPRequest;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Util\Crypto;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Util\Strings;
|
||||
use Friendica\Util\XML;
|
||||
|
||||
|
@ -72,7 +72,7 @@ class Salmon
|
|||
$ret[$x] = substr($ret[$x], 5);
|
||||
}
|
||||
} elseif (Strings::normaliseLink($ret[$x]) == 'http://') {
|
||||
$ret[$x] = Network::fetchUrl($ret[$x]);
|
||||
$ret[$x] = HTTPRequest::fetchUrl($ret[$x]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ class Salmon
|
|||
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
|
||||
|
||||
// slap them
|
||||
$postResult = Network::post($url, $salmon, [
|
||||
$postResult = 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 = Network::post($url, $salmon, [
|
||||
$postResult = 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 = Network::post($url, $salmon, [
|
||||
$postResult = 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