yii\authclient\BaseOAuth::sendRequest PHP Method

sendRequest() protected method

Sends the given HTTP request, returning response data.
Since: 2.1
protected sendRequest ( Request $request ) : array
$request yii\httpclient\Request HTTP request to be sent.
return array response data.
    protected function sendRequest($request)
    {
        $response = $request->send();
        if (!$response->getIsOk()) {
            throw new InvalidResponseException($response, 'Request failed with code: ' . $response->getStatusCode() . ', message: ' . $response->getContent());
        }
        return $response->getData();
    }