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

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

Open
Sharewithyou opened this issue Oct 26, 2018 · 1 comment

Comments

@Sharewithyou
Copy link

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

@glga-byte
Copy link

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

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

2 participants