protected static function requestCurl($url, $params)
    {
        $ch = curl_init();

        $options = array(
            CURLOPT_URL => $url,
            CURLOPT_HTTPHEADER => self::getHeaders(),
            CURLOPT_POSTFIELDS => json_encode($params),
            CURLOPT_CONNECTTIMEOUT => self::$connectTimeout,
            CURLOPT_TIMEOUT => self::$requestTimeout,
            CURLOPT_USERAGENT => self::getUserAgent(),
            CURLOPT_RETURNTRANSFER => true
        );

        curl_setopt_array($ch, $options);

        $result = curl_exec($ch);

        if ($result === false) {
            $e = new Error(curl_error($ch));
            curl_close($ch);
            throw $e;
        }

        curl_close($ch);

        return $result;
    }