class RateLimitResponseBuilder
extends ResponseBuilder
import { RateLimitResponseBuilder } from "https://dotland.deno.dev/x/drash@v3.0.0-beta.2/src/modules/middleware/RateLimiter/RateLimitResponse.ts";
A Response
decorator that attaches the following behaviors:
- Response building
- X-RateLimit-* header setting
Methods
addRateLimitHeaders(values: { limit: number; remaining: number; reset: number; retry_after: Date; })
Add the x-ratelimit-*
headers to the response.
build(): Response