diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-12-04 18:02:47 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-12-04 18:02:47 +0100 |
commit | 4548a0aa90cd3b3a0034178609f74bca5b0eccd3 (patch) | |
tree | e9313529a661a386a5ad5382083f5bfc08b48eb9 /lib/private/apphelper.php | |
parent | e91eba4b5bd856cb1ef81996ace6d16c09f1bb01 (diff) | |
download | nextcloud-server-4548a0aa90cd3b3a0034178609f74bca5b0eccd3.tar.gz nextcloud-server-4548a0aa90cd3b3a0034178609f74bca5b0eccd3.zip |
Remove OC_Util::getUrlContent and replace by proper usage of public interfaces
Diffstat (limited to 'lib/private/apphelper.php')
-rw-r--r-- | lib/private/apphelper.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/apphelper.php b/lib/private/apphelper.php index 9084d2b8ab4..478787b21d8 100644 --- a/lib/private/apphelper.php +++ b/lib/private/apphelper.php @@ -36,6 +36,12 @@ class AppHelper implements \OCP\IHelper { * @deprecated 8.1.0 Use \OCP\IServerContainer::getHTTPClientService */ public function getUrlContent($url) { - return \OC_Util::getUrlContent($url); + try { + $client = \OC::$server->getHTTPClientService()->newClient(); + $response = $client->get($url); + return $response->getBody(); + } catch (\Exception $e) { + return false; + } } } |