mirror of
https://github.com/friendica/friendica
synced 2025-04-25 09:50:11 +00:00
Rename "HTTPRequest::curl()" to HTTPRequest::get()
This commit is contained in:
parent
e5649d6dbf
commit
7029012f27
22 changed files with 66 additions and 64 deletions
|
@ -755,7 +755,7 @@ class OStatus
|
|||
|
||||
self::$conv_list[$conversation] = true;
|
||||
|
||||
$curlResult = DI::httpRequest()->curl($conversation, false, ['accept_content' => 'application/atom+xml, text/html']);
|
||||
$curlResult = DI::httpRequest()->get($conversation, false, ['accept_content' => 'application/atom+xml, text/html']);
|
||||
|
||||
if (!$curlResult->isSuccess()) {
|
||||
return;
|
||||
|
@ -784,7 +784,7 @@ class OStatus
|
|||
}
|
||||
}
|
||||
if ($file != '') {
|
||||
$conversation_atom = DI::httpRequest()->curl($attribute['href']);
|
||||
$conversation_atom = DI::httpRequest()->get($attribute['href']);
|
||||
|
||||
if ($conversation_atom->isSuccess()) {
|
||||
$xml = $conversation_atom->getBody();
|
||||
|
@ -901,7 +901,7 @@ class OStatus
|
|||
return;
|
||||
}
|
||||
|
||||
$curlResult = DI::httpRequest()->curl($self);
|
||||
$curlResult = DI::httpRequest()->get($self);
|
||||
|
||||
if (!$curlResult->isSuccess()) {
|
||||
return;
|
||||
|
@ -948,7 +948,7 @@ class OStatus
|
|||
}
|
||||
|
||||
$stored = false;
|
||||
$curlResult = DI::httpRequest()->curl($related, false, ['accept_content' => 'application/atom+xml, text/html']);
|
||||
$curlResult = DI::httpRequest()->get($related, false, ['accept_content' => 'application/atom+xml, text/html']);
|
||||
|
||||
if (!$curlResult->isSuccess()) {
|
||||
return;
|
||||
|
@ -979,7 +979,7 @@ class OStatus
|
|||
}
|
||||
}
|
||||
if ($atom_file != '') {
|
||||
$curlResult = DI::httpRequest()->curl($atom_file);
|
||||
$curlResult = DI::httpRequest()->get($atom_file);
|
||||
|
||||
if ($curlResult->isSuccess()) {
|
||||
Logger::log('Fetched XML for URI ' . $related_uri, Logger::DEBUG);
|
||||
|
@ -991,7 +991,7 @@ class OStatus
|
|||
|
||||
// Workaround for older GNU Social servers
|
||||
if (($xml == '') && strstr($related, '/notice/')) {
|
||||
$curlResult = DI::httpRequest()->curl(str_replace('/notice/', '/api/statuses/show/', $related) . '.atom');
|
||||
$curlResult = DI::httpRequest()->get(str_replace('/notice/', '/api/statuses/show/', $related) . '.atom');
|
||||
|
||||
if ($curlResult->isSuccess()) {
|
||||
Logger::log('GNU Social workaround to fetch XML for URI ' . $related_uri, Logger::DEBUG);
|
||||
|
@ -1002,7 +1002,7 @@ class OStatus
|
|||
// Even more worse workaround for GNU Social ;-)
|
||||
if ($xml == '') {
|
||||
$related_guess = self::convertHref($related_uri);
|
||||
$curlResult = DI::httpRequest()->curl(str_replace('/notice/', '/api/statuses/show/', $related_guess) . '.atom');
|
||||
$curlResult = DI::httpRequest()->get(str_replace('/notice/', '/api/statuses/show/', $related_guess) . '.atom');
|
||||
|
||||
if ($curlResult->isSuccess()) {
|
||||
Logger::log('GNU Social workaround 2 to fetch XML for URI ' . $related_uri, Logger::DEBUG);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue