mirror of
https://github.com/friendica/friendica
synced 2025-04-29 10:24:23 +02:00
Introduce "accept_header" as specific argument to the http client
This commit is contained in:
parent
73c3b21665
commit
e299fc67c8
35 changed files with 150 additions and 150 deletions
|
@ -73,7 +73,7 @@ class Salmon
|
|||
$ret[$x] = substr($ret[$x], 5);
|
||||
}
|
||||
} elseif (Strings::normaliseLink($ret[$x]) == 'http://') {
|
||||
$ret[$x] = DI::httpClient()->fetch($ret[$x], 0, HttpClientAccept::MAGIC_KEY);
|
||||
$ret[$x] = DI::httpClient()->fetch($ret[$x], HttpClientAccept::MAGIC_KEY);
|
||||
Logger::debug('Fetched public key', ['url' => $ret[$x]]);
|
||||
}
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ class Salmon
|
|||
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
|
||||
|
||||
// slap them
|
||||
$postResult = DI::httpClient()->post($url, $salmon, [
|
||||
$postResult = DI::httpClient()->post($url, $salmon, HttpClientAccept::DEFAULT, [
|
||||
'Content-type' => 'application/magic-envelope+xml',
|
||||
'Content-length' => strlen($salmon),
|
||||
]);
|
||||
|
@ -182,7 +182,7 @@ class Salmon
|
|||
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
|
||||
|
||||
// slap them
|
||||
$postResult = DI::httpClient()->post($url, $salmon, [
|
||||
$postResult = DI::httpClient()->post($url, $salmon, HttpClientAccept::DEFAULT, [
|
||||
'Content-type' => 'application/magic-envelope+xml',
|
||||
'Content-length' => strlen($salmon),
|
||||
]);
|
||||
|
@ -205,7 +205,7 @@ class Salmon
|
|||
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
|
||||
|
||||
// slap them
|
||||
$postResult = DI::httpClient()->post($url, $salmon, [
|
||||
$postResult = DI::httpClient()->post($url, $salmon, HttpClientAccept::DEFAULT, [
|
||||
'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