From 49c20cac5fd21c278cf3e20850adacf24ccb124d Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Fri, 21 Dec 2012 10:22:28 -0500 Subject: [PATCH] Simplified HTTP access. --- module/VuFind/src/VuFind/Controller/AdminController.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/module/VuFind/src/VuFind/Controller/AdminController.php b/module/VuFind/src/VuFind/Controller/AdminController.php index 3438df90a8b..93b78d5ae9c 100644 --- a/module/VuFind/src/VuFind/Controller/AdminController.php +++ b/module/VuFind/src/VuFind/Controller/AdminController.php @@ -27,8 +27,7 @@ */ namespace VuFind\Controller; use VuFind\Config\Reader as ConfigReader, - VuFind\Exception\Forbidden as ForbiddenException, - VuFind\Http\Client as HttpClient, Zend\Mvc\MvcEvent; + VuFind\Exception\Forbidden as ForbiddenException, Zend\Mvc\MvcEvent; /** * Class controls VuFind administration. @@ -131,8 +130,8 @@ class AdminController extends AbstractBase $config = ConfigReader::getConfig(); $xml = false; if (isset($config->Index->url)) { - $client = new HttpClient($config->Index->url . '/admin/multicore'); - $response = $client->setMethod('GET')->send(); + $response = $this->getServiceLocator()->get('VuFind\Http') + ->get($config->Index->url . '/admin/multicore'); $xml = $response->isSuccess() ? $response->getBody() : false; } $view = $this->createViewModel(); -- GitLab