Advanced Usage
Learn advanced patterns for getting the most out of the Acme SDK.
Middleware
Add custom middleware to intercept requests and responses:
;
;
Batching Requests
Batch multiple operations for better performance:
;
// results[0] = user_1 data
// results[1] = user_2 data
// results[2] = user_3 data
Pagination
Handle paginated responses with built-in iterators:
// Manual pagination
;
while page.hasMore
// Async iterator (recommended)
for await of
Custom HTTP Client
Use your own HTTP client for advanced networking needs:
;
;
;
;
Webhooks
Verify and handle incoming webhooks:
;
;
;
'/webhooks/acme', ,;
Caching
Implement response caching for improved performance:
;
;
;
Migration from v1.1.x
Breaking Changes in v1.2.0
Async/Await
All methods now return Promises instead of using callbacks:
// v1.1.x (deprecated)
'user_123',;
// v1.2.x
;
Import Changes
// v1.1.x
;
// v1.2.x
;
// or
;