public function performCall(
        LoggerInterface $logger,
        $data,
        $content_type,
        $encrypt=false
    ) {

        $this->setHttpMethod("POST");

        try {

            $logger->debug("Sending RPC data");

            $logger->debug("Original request data dump: ".$data);

            $data = $this->can($data, $encrypt);

            $logger->debug("Real request data dump: ".$data);

            $response = $this->setContentType($content_type)->send($data);

            $logger->debug("Real response data dump: ".$response);

            $return = $this->uncan($response, $encrypt);

            $logger->debug("Decoded response data dump: ".$return);

        } catch (HttpException $he) {

            $logger->error("HTTP Transport error: ".$he->getMessage());

            throw $he;

        } catch (RpcException $re) {

            $logger->error("RPC Client error: ".$re->getMessage());

            throw $re;

        } catch (Exception $e) {

            $logger->critical("Generic Client error: ".$e->getMessage());

            throw $e;

        }

        return $return;

    }