From 41ab75b8529c1a62cf6da79d925c147e2415327e Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Fri, 13 Jul 2012 08:47:05 -0400 Subject: [PATCH] Updated calls to the HTTP library. --- module/VuFind/src/VuFind/Connection/SRU.php | 2 +- module/VuFind/src/VuFind/Connection/WorldCat.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/VuFind/src/VuFind/Connection/SRU.php b/module/VuFind/src/VuFind/Connection/SRU.php index 311b66c38a5..c658872fa26 100644 --- a/module/VuFind/src/VuFind/Connection/SRU.php +++ b/module/VuFind/src/VuFind/Connection/SRU.php @@ -265,7 +265,7 @@ class SRU public function checkForHttpError($result) { if (!$result->isSuccess()) { - throw new \Exception('HTTP error ' . $result->getStatus()); + throw new \Exception('HTTP error ' . $result->getStatusCode()); } } diff --git a/module/VuFind/src/VuFind/Connection/WorldCat.php b/module/VuFind/src/VuFind/Connection/WorldCat.php index 80c3b6a0639..718fa33805f 100644 --- a/module/VuFind/src/VuFind/Connection/WorldCat.php +++ b/module/VuFind/src/VuFind/Connection/WorldCat.php @@ -75,7 +75,7 @@ class WorldCat extends SRU if ($this->logger) { $this->logger->debug('Connect: ' . $uri); } - $result = $this->client->request('POST'); + $result = $this->client->setMethod('POST')->send(); $this->checkForHttpError($result); return simplexml_load_string($result->getBody()); @@ -98,7 +98,7 @@ class WorldCat extends SRU if ($this->logger) { $this->logger->debug('Connect: ' . $uri); } - $result = $this->client->request('POST'); + $result = $this->client->setMethod('POST')->send(); $this->checkForHttpError($result); return $result->getBody(); -- GitLab