public class RateLimitInterceptor extends Object implements okhttp3.Interceptor
| Constructor and Description |
|---|
RateLimitInterceptor(RateLimitsListener listener)
Create a new ratelimit interceptor.
|
| Modifier and Type | Method and Description |
|---|---|
okhttp3.Response |
intercept(okhttp3.Interceptor.Chain chain)
Intercept a http call.
|
public RateLimitInterceptor(RateLimitsListener listener)
listener - an object to be informed once a rate limit header is encountered.IllegalArgumentException - if listener is null.public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain)
throws IOException
intercept in interface okhttp3.Interceptorchain - the current chain of calls.IOException - if something goes wrong.Copyright © 2026 Contentful, GmbH.. All rights reserved.