Esempio n. 1
0
        private async Task <IReadOnlyDictionary <string, string> > GetAccessTokenResult(string code)
        {
            var response = await base.Backchannel.GetAsync(BuildAccessTokenUrl(code), Context.RequestAborted);

            response.EnsureSuccessStatusCode();
            var text = await response.Content.ReadAsStringAsync();

            return(QQConncetHelper.ParseAccessTokenResult(text));
        }
Esempio n. 2
0
        private async Task <IReadOnlyDictionary <string, string> > GetAccessTokenResult(string code)
        {
            var response = await _httpClient.GetAsync(BuildAccessTokenUrl(code), Request.CallCancelled);

            response.EnsureSuccessStatusCode();
            var text = await response.Content.ReadAsStringAsync();

            return(QQConncetHelper.ParseAccessTokenResult(text));
        }