Skip to content
Snippets Groups Projects
Commit 49c20cac authored by Demian Katz's avatar Demian Katz
Browse files

Simplified HTTP access.

parent 416858ab
No related merge requests found
...@@ -27,8 +27,7 @@ ...@@ -27,8 +27,7 @@
*/ */
namespace VuFind\Controller; namespace VuFind\Controller;
use VuFind\Config\Reader as ConfigReader, use VuFind\Config\Reader as ConfigReader,
VuFind\Exception\Forbidden as ForbiddenException, VuFind\Exception\Forbidden as ForbiddenException, Zend\Mvc\MvcEvent;
VuFind\Http\Client as HttpClient, Zend\Mvc\MvcEvent;
/** /**
* Class controls VuFind administration. * Class controls VuFind administration.
...@@ -131,8 +130,8 @@ class AdminController extends AbstractBase ...@@ -131,8 +130,8 @@ class AdminController extends AbstractBase
$config = ConfigReader::getConfig(); $config = ConfigReader::getConfig();
$xml = false; $xml = false;
if (isset($config->Index->url)) { if (isset($config->Index->url)) {
$client = new HttpClient($config->Index->url . '/admin/multicore'); $response = $this->getServiceLocator()->get('VuFind\Http')
$response = $client->setMethod('GET')->send(); ->get($config->Index->url . '/admin/multicore');
$xml = $response->isSuccess() ? $response->getBody() : false; $xml = $response->isSuccess() ? $response->getBody() : false;
} }
$view = $this->createViewModel(); $view = $this->createViewModel();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment