Stripe\ApiRequestor::request PHP Метод

request() публичный Метод

public request ( string $method, string $url, array | null $params = null, array | null $headers = null ) : array
$method string
$url string
$params array | null
$headers array | null
Результат array An array whose first element is an API response and second element is the API key used to make the request.
    public function request($method, $url, $params = null, $headers = null)
    {
        if (!$params) {
            $params = array();
        }
        if (!$headers) {
            $headers = array();
        }
        list($rbody, $rcode, $rheaders, $myApiKey) = $this->_requestRaw($method, $url, $params, $headers);
        $json = $this->_interpretResponse($rbody, $rcode, $rheaders);
        $resp = new ApiResponse($rbody, $rcode, $rheaders, $json);
        return array($resp, $myApiKey);
    }