Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Send informational headers on every response #30

Closed
azzlack opened this issue May 20, 2015 · 6 comments
Closed

Send informational headers on every response #30

azzlack opened this issue May 20, 2015 · 6 comments

Comments

@azzlack
Copy link

azzlack commented May 20, 2015

Would be nice to send the X-Rate-Limit-Limit, X-Rate-Limit-Remaining, X-Rate-Limit-Reset headers back on each response so users of the api can deal with it on their side before it becomes a problem.
Like https://dev.twitter.com/rest/public/rate-limiting

@ghost
Copy link

ghost commented Jul 21, 2015

@azzlack
That sounds like a great idea. Are you planning on trying a pr for this?

@stefanprodan
Copy link
Owner

Twitter has a single rate limit period(15 minutes), WebApiThrottle lets you specify multiple periods: per second, minute, hour, day and week. Injecting 15 headers in the response (3 for each period) will add too much weight to the response. I'am opened to suggestions on how can this be accomplish without polluting the response.

@escobar5
Copy link

escobar5 commented Sep 9, 2015

Is there a way to query the values to set this headers in my own Filter?

@project-ext
Copy link

Any news on this?

@stefanprodan
Copy link
Owner

This has been implemented in the ASP.NET Core version.

@graham-saunders
Copy link

I added a custom solution under #126 for the non-core version of this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants