use*_*968 8 c# google-api google-oauth
我目前正在对以下URL执行WebClient.UploadValues():
https://accounts.google.com/o/oauth2/token
我遇到的问题是,上述URL的POST需要20多秒才能执行并提供响应.我尝试了两种不同的方法(通过C#)使用一些参数发布到URL,但这两种方法花费的时间相同
有什么建议/想法吗?示例代码如下:
postData.Add("code", code);
postData.Add("client_id", GetAppID());
postData.Add("client_secret", GetAppSecret());
postData.Add("redirect_uri", GetRedirectURL(redirectUrl));
postData.Add("grant_type", "authorization_code");
string TokenResponse = Encoding.UTF8.GetString(
WebClient.UploadValues(
"https://accounts.google.com/o/oauth2/token",
"POST",
postData));
Run Code Online (Sandbox Code Playgroud)