Added configuration option http.middlewares - #14
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThe changes introduce HTTP middleware support to the AMP client by extending the Nette DI extension configuration schema to accept a list of middlewares, which are normalized to Statement objects and passed to HttpClientFactory for application to each created HTTP client. Changes
Sequence Diagram(s)sequenceDiagram
participant DI as DI Container
participant Ext as AmpClientExtension
participant Factory as HttpClientFactory
participant Client as HttpClient
DI->>Ext: Load configuration with http.middlewares
Ext->>Ext: Normalize middlewares to Statement objects
Ext->>Factory: Create with middlewares array
Factory->>Factory: Store middlewares in property
Note over Factory: When creating HTTP client
Factory->>Factory: Iterate middlewares property
Factory->>Factory: Aggregate into local chain via with()
Factory->>Client: Build handler stack with middlewares
Client->>Client: Execute request through middleware chain
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 🧪 Unit Test Generation v2 is now available!We have significantly improved our unit test generation capabilities. To enable: Add this to your reviews:
finishing_touches:
unit_tests:
enabled: trueTry it out by using the Have feedback? Share your thoughts on our Discord thread! Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Pull Request Test Coverage Report for Build 21503845150Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.