My app currently uses OAuth to communicate with the Twitter API. Back in December, Twitter upped the rate limit for OAuth to 350 requests per hour. However, I am not seeing this. I am still getting 150 from the account/rate_limit_status method.
I was told that I needed to use the X-RateLimit-Limit
HTTP header to get the new rate limit. However, in my code, I do not see that header.
Here is my code...
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(newURL);
request.Method = "GET";
request.ServicePoint.Expect100Continue = false;
request.ContentType = "application/x-www-form-urlencoded";
using (WebResponse response = request.GetResponse())
{
using (StreamReader reader = new StreamReader(response.GetResponseStream()))
{
responseString = reader.ReadToEnd();
}
}
If I inspect the response
, I can see that it has a property for Headers
, and that there are 16 headers. However, I do not have X-RateLimit-Limit
in the list.
(source: yfrog.com)
Any idea what I am doing wrong?
request
only has two headers: Content-Type and Host. And those are RequestHeaders. TheX-RateLimit-Limit
comes from Twitter, so I would have assumed it would be in the response. – Blazonry