public function performRequest($method, $uri, $params = null, $body = null)
    {
        try {
            // serialize(json) body if it's not already a string
            if ($body !== null) {
                $body = $this->getSerializer()->serialize($body);
            }

            return $this->processRequest(
                $method,
                $uri,
                $params,
                $body
            );
        } catch (ClientErrorResponseException $exception) {
            throw $exception;
        } catch (ServerErrorResponseException $exception) {
            throw $exception;
        }
    }
public function performRequest($method, $uri, $params = null, $body = null)
    {
        try {
            // serialize(json) body if it's not already a string
            if ($body !== null) {
                $body = $this->getSerializer()->serialize($body);
            }

            return $this->processRequest(
                $method,
                $uri,
                $params,
                $body
            );
        } catch (ClientErrorResponseException $exception) {
            throw $exception;
        } catch (ServerErrorResponseException $exception) {
            throw $exception;
        }
    }
public function performRequest ( $ method , $ uri , $ params = null , $ body = null ) { try { // serialize(json) body if it's not already a string if ( $ body !== null ) { $ body = $ this -> getSerializer ( ) -> serialize ( $ body ) ; } return $ this -> processRequest ( $ method , $ uri , $ params , $ body ) ; } catch ( ClientErrorResponseException $ exception ) { throw $ exception ; } catch ( ServerErrorResponseException $ exception ) { throw $ exception ; } }
performs the request

@param string $method request method
@param string $uri    uri string
@param mixed  $params optional query string parameters
@param mixed  $body   "post" body

@return mixed
@throws \Puzzle\Exceptions\ServerErrorResponseException
@throws \Puzzle\Exceptions\ClientErrorResponseException
performs the request