ten sposób wzywam serwis z .NET:Dlaczego pojawia się błąd wymagający długości 411?
var requestedURL = "https://accounts.google.com/o/oauth2/token?code=" + code + "&client_id=" + client_id + "&client_secret=" + client_secret + "&redirect_uri=" + redirect_uri + "&grant_type=authorization_code";
HttpWebRequest authRequest = (HttpWebRequest)WebRequest.Create(requestedURL);
authRequest.ContentType = "application/x-www-form-urlencoded";
authRequest.Method = "POST";
WebResponse authResponseTwitter = authRequest.GetResponse();
ale gdy ta metoda jest wywoływana, otrzymuję:
Exception Details: System.Net.WebException: The remote server returned an error: (411) Length Required.
co mam zrobić?
Czy możesz odnieść się do mojego pytania "http://stackoverflow.com/questions/35308945/accessing-sftp-url-from-console-application-using-c-sharp"? Mam podobny problem. Próbuję trafić URL SFTP –