private function performHttpRequest($httpRequest, $ensureSuccess = true)
	{
		$httpResponse = null;
	
		// See if the requests succeeds at all
		try
		{
			$httpResponse = $this->_httpClient->dispatch($httpRequest);
		}
		catch (\Exception $e)
		{
			if ($ensureSuccess)
				throw new ClientException($e->getMessage(), $e->getCode());
		}

		// Check the request status
		if ($ensureSuccess && $httpResponse !== null && !$httpResponse->isSuccess())
		{
			throw new ClientException(
			$httpResponse->getReasonPhrase(), $httpResponse->getStatusCode());
		}

		return $httpResponse;
	}
private function performHttpRequest($httpRequest, $ensureSuccess = true)
	{
		$httpResponse = null;
	
		// See if the requests succeeds at all
		try
		{
			$httpResponse = $this->_httpClient->dispatch($httpRequest);
		}
		catch (\Exception $e)
		{
			if ($ensureSuccess)
				throw new ClientException($e->getMessage(), $e->getCode());
		}

		// Check the request status
		if ($ensureSuccess && $httpResponse !== null && !$httpResponse->isSuccess())
		{
			throw new ClientException(
			$httpResponse->getReasonPhrase(), $httpResponse->getStatusCode());
		}

		return $httpResponse;
	}
private function performHttpRequest ( $ httpRequest , $ ensureSuccess = true ) { $ httpResponse = null ; // See if the requests succeeds at all try { $ httpResponse = $ this -> _httpClient -> dispatch ( $ httpRequest ) ; } catch ( \ Exception $ e ) { if ( $ ensureSuccess ) throw new ClientException ( $ e -> getMessage ( ) , $ e -> getCode ( ) ) ; } // Check the request status if ( $ ensureSuccess && $ httpResponse !== null && ! $ httpResponse -> isSuccess ( ) ) { throw new ClientException ( $ httpResponse -> getReasonPhrase ( ) , $ httpResponse -> getStatusCode ( ) ) ; } return $ httpResponse ; }
Performs the specified HTTP request and returns the HTTP response
@param \Zend\Http\Request $httpRequest the request
@param boolean $ensureSuccess throw exception if the request was
unsuccessful
@return \Zend\Http\Response the response
@throws ClientException if the request was unsuccessful
Performs the specified HTTP request and returns the HTTP response