mirror of
https://github.com/apple/swift-nio
synced 2026-11-28 05:14:23 +00:00
### Motivation: `NIOHTTP1.HTTPPipelineSetup` contains helper methods which add HTTP/1 client/server handlers to the provided channel pipeline. Over time, we have had to duplicate these methods when introducing a new configuration option in order to not break API. As a result, there is now lots of duplication in `NIOHTTP1.HTTPPipelineSetup` and introducing more configuration options is very cumbersome. We should instead add a configuration type to solve this problem. ### Modifications: - Added new configuration types named `NIOHTTPServerPipelineConfiguration`, and `NIOHTTPServerPipelineSynchronousConfiguration`. - Added a new pipeline setup helper method on `ChannelPipeline` and `ChannelPipeline.SynchronousOperations` that requires the configuration type as an argument. - Deprecated all existing helper methods on `ChannelPipeline` and `ChannelPipeline.SynchronousOperations`. ### Result: Better API.