EasyPost\Requestor::request PHP Method

request() public method

public request ( string $method, string $url, mixed $params = null, $apiKeyRequired = true ) : array
$method string
$url string
$params mixed
return array
    public function request($method, $url, $params = null, $apiKeyRequired = true)
    {
        if (!$params) {
            $params = array();
        }
        list($httpBody, $httpStatus, $myApiKey) = $this->_requestRaw($method, $url, $params, $apiKeyRequired);
        $response = $this->_interpretResponse($httpBody, $httpStatus);
        return array($response, $myApiKey);
    }