From 72c24efe5b1805c95d99ccfd891742d9178e87ae Mon Sep 17 00:00:00 2001 From: nupplaPhil Date: Wed, 4 Mar 2020 22:35:08 +0100 Subject: [PATCH] Rename "HTTPRequest::curl()" to HTTPRequest::get() --- discourse/discourse.php | 4 ++-- openstreetmap/openstreetmap.php | 2 +- pumpio/pumpio.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/discourse/discourse.php b/discourse/discourse.php index 5e64c173..b3f95bbb 100644 --- a/discourse/discourse.php +++ b/discourse/discourse.php @@ -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; } diff --git a/openstreetmap/openstreetmap.php b/openstreetmap/openstreetmap.php index ede71ccd..efd0745e 100644 --- a/openstreetmap/openstreetmap.php +++ b/openstreetmap/openstreetmap.php @@ -131,7 +131,7 @@ function openstreetmap_get_coordinates($a, &$b) $j = DI::cache()->get($cachekey); if (is_null($j)) { - $curlResult = DI::httpRequest()->curl($nomserver . $args); + $curlResult = DI::httpRequest()->get($nomserver . $args); if ($curlResult->isSuccess()) { $j = json_decode($curlResult->getBody(), true); DI::cache()->set($cachekey, $j, Duration::MONTH); diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index d8590284..2144257d 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -1604,7 +1604,7 @@ function pumpio_fetchallcomments(App $a, $uid, $id) function pumpio_reachable($url) { - return DI::httpRequest()->curl($url, false, ['timeout' => 10])->isSuccess(); + return DI::httpRequest()->get($url, false, ['timeout' => 10])->isSuccess(); } /* -- 2.39.5