Added the rate limit middleware.

This commit is contained in:
javier committed 2026-10-25 18:14:19 +01:00
1 parent 35b3b7953d
commit 2d86dff608
4 files changed
+326

No files matched your search

+11
View File
@@ -86,6 +86,17 @@ repeat {
} while cursor != nil
```
### Handling Rate Limits
Add `RateLimitMiddleware` before the authentication middleware to retry `429 Too Many Requests` responses:
```swift
middlewares: [
RateLimitMiddleware(),
BearerAuthMiddleware { try await tokenProvider.token() }
]
```
## Supported Platforms
- iOS 14.0+