TsgcWSRateLimiter › Properties › Response
Shape of the HTTP response returned for throttled requests (status, body, headers).
property Response: TsgcRateLimitResponse read FResponse write SetResponse;
—
Controls StatusCode (default 429, set to 503 for maintenance-style rejection), Message (body text), RetryAfterHeader (when True adds a Retry-After header with the computed retry delay in seconds) and IncludeRateLimitHeaders (when True adds X-RateLimit-Limit / X-RateLimit-Remaining / X-RateLimit-Reset headers to every response). Enable both header options so well-behaved clients can pace themselves proactively instead of reacting only to rejections.
sgcWSRateLimiter1.Response.StatusCode := 429;
sgcWSRateLimiter1.Response.Message := 'Too Many Requests — please slow down';
sgcWSRateLimiter1.Response.RetryAfterHeader := True;
sgcWSRateLimiter1.Response.IncludeRateLimitHeaders := True;