Reputation: 8543
I have been banging my head on this for a long time now no avail. Hoping some fellow SOers can help out.
using oAuth.net library for the Gmail Contacts API
The request seems well-formed and I have stepped through the requests, and cannot discern anything wrong.
Tried checking if the timestamp is an issue - it seems that was a common issue on the gmail forums, tried changing to various time-zones, still no luck.
public string WebResponseGet(HttpWebRequest webRequest) { StreamReader responseReader = null; string responseData = "";
try
{
//This is where the exception is thrown
responseReader = new StreamReader(webRequest.GetResponse().GetResponseStream());
responseData = responseReader.ReadToEnd();
}
catch (WebException ex)
{
Console.WriteLine(ex);
throw;
}
finally
{
webRequest.GetResponse().GetResponseStream().Close();
responseReader.Close();
responseReader = null;
}
return responseData;
}
Upvotes: 0
Views: 1283