WebApiThrottle icon indicating copy to clipboard operation
WebApiThrottle copied to clipboard

How can I response a json result with QuotaExceededMessage instead of a string?

Open Sharewithyou opened this issue 7 years ago • 1 comments

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

Sharewithyou avatar Oct 26 '18 09:10 Sharewithyou

You can do that with QuotaExceededContent: QuotaExceededContent = (rateLimit, key) => new { property="value" }

glga-byte avatar May 10 '19 10:05 glga-byte