Skip to content

Commit 1a24d0b

Browse files
committed
docs: Fix incorrect API usage examples to use Middleware
Fixed all examples that incorrectly used custom `fetch` function parameter: - Authentication: Now uses api.use() with onRequest middleware for JWT token injection - Token Refresh Flow: Uses onRequest and onResponse middleware for automatic token refresh - Request Cancellation: Uses signal parameter in api.get() options - Timeout Configuration: Uses middleware with AbortController - Retry Logic: Uses onResponse middleware for retry on server errors - Logging & Debugging: Uses onRequest/onResponse middleware - Caching Strategy: Uses onRequest middleware to return cached responses - Rate Limiting: Uses onRequest middleware with rate limiter Removed duplicate "Request Interceptors" section (functionality covered by Middleware examples) All examples now correctly demonstrate devup-api's Middleware API pattern as shown in test files.
1 parent 6f84b43 commit 1a24d0b

File tree

1 file changed

+139
-145
lines changed

1 file changed

+139
-145
lines changed

0 commit comments

Comments
 (0)