Twilio.TwilioRestClient.RedirectCallAsyncInternal C# (CSharp) Method

RedirectCallAsyncInternal() private method

private RedirectCallAsyncInternal ( string callSid, string redirectUrl, string redirectMethod ) : Task
callSid string
redirectUrl string
redirectMethod string
return Task
        private async Task<Call> RedirectCallAsyncInternal(string callSid, string redirectUrl, string redirectMethod)
        {
            Require.Argument("CallSid", callSid);
            Require.Argument("Url", redirectUrl);

            var request = new RestRequest();
            request.Method = Method.POST;
            request.Resource = "Accounts/{AccountSid}/Calls/{CallSid}.json";

            request.AddParameter("CallSid", callSid, ParameterType.UrlSegment);
            request.AddParameter("Url", redirectUrl);
            if (redirectMethod.HasValue()) request.AddParameter("Method", redirectMethod);

            var result = await ExecuteAsync(request, typeof(Call));
            return (Call)result;

        }