2
I’m trying to make an integration with the service of http://api.beanstalkapp.com/
and I’m having trouble making the request in C#, always returns me the error below:
An Exception of type 'System.Net.Webexception' occurred in System.dll but was not handled in user code
Additional information: The underlying connection was closed: Unexpected error in an upload.
Follow the code:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(urlBeanstalk);
request.Method = "GET";
request.Accept = "application/json";
request.ContentType = "application/json; charset=utf-8";
request.Headers.Add(HttpRequestHeader.Authorization, "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(username + ":" + password)));
WebResponse response = (HttpWebResponse)request.GetResponse();
What address are you trying to request?
– Jéf Bueno
https://{Domain}.beanstalkapp.com/api/users/Current.json
– Paulo Faitarone