You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.
I'd like to set the rate to 2/min for function #1 and to 10/min for the 2nd function following the example as the code below. The code is running fine, but the throttling is not working at all. I can get an unlimited number of "value" and "value1 and value2". Do I also need to change settings in webApiConfig.cs? Please help.
using System.Web.Http;
using WebApiThrottle;
namespace wepApiThrottle.Controllers
{
[EnableThrottling(PerMinute = 2)]
public class ValuesController : ApiController
{
// GET api/values
[EnableThrottling(PerMinute = 2)]
public IEnumerable<string> Get()
{
return new string[] { "value1", "value2" };
}
// GET api/values/5
[EnableThrottling(PerMinute = 10)]
public string Get(int id)
{
return "value";
}
}
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'd like to set the rate to 2/min for function #1 and to 10/min for the 2nd function following the example as the code below. The code is running fine, but the throttling is not working at all. I can get an unlimited number of "value" and "value1 and value2". Do I also need to change settings in webApiConfig.cs? Please help.
The text was updated successfully, but these errors were encountered: