Rename "HTTPRequest::curl()" to HTTPRequest::get()

This commit is contained in:
nupplaPhil 2020-03-04 22:35:08 +01:00 committed by Hypolite Petovan
parent 90193bd02b
commit 72c24efe5b
3 changed files with 4 additions and 4 deletions

View file

@ -114,7 +114,7 @@ function discourse_email_getmessage(App $a, &$message)
function discourse_fetch_post($host, $topic, $pid)
{
$url = $host . '/t/' . $topic . '/' . $pid . '.json';
$curlResult = DI::httpRequest()->curl($url);
$curlResult = DI::httpRequest()->get($url);
if (!$curlResult->isSuccess()) {
Logger::info('No success', ['url' => $url]);
return false;
@ -151,7 +151,7 @@ function discourse_fetch_post_from_api(&$message, $post, $host)
{
$hostaddr = 'https://' . $host;
$url = $hostaddr . '/posts/' . $post . '.json';
$curlResult = DI::httpRequest()->curl($url);
$curlResult = DI::httpRequest()->get($url);
if (!$curlResult->isSuccess()) {
return false;
}