WebApiThrottle
WebApiThrottle copied to clipboard
How can I response a json result with QuotaExceededMessage instead of a string?
I Try to user it as folllowing: QuotaExceededMessage = JsonConvert.SerializeObject(new ApiResult(429001, "it use frequently,only allow {0} per {1}"),please wait a moment")) but it don't support , I just want to response a custom json result , how can I to implement
You can do that with QuotaExceededContent:
QuotaExceededContent = (rateLimit, key) => new { property="value" }