addHTTPClientHandlers(position:leftOverBytesStrategy:enableOutboundHeaderValidation:withClientUpgrade:)

Configure a ChannelPipeline for use as a HTTP client.

HTTPPipelineSetup.swift:132
@preconcurrency func addHTTPClientHandlers(position: ChannelPipeline.Position = .last, leftOverBytesStrategy: RemoveAfterUpgradeStrategy = .dropBytes, enableOutboundHeaderValidation: Bool = true, withClientUpgrade upgrade: NIOHTTPClientUpgradeSendableConfiguration? = nil) -> EventLoopFuture<Void>

Parameters

position

The position in the ChannelPipeline where to add the HTTP client handlers. Defaults to .last.

leftOverBytesStrategy

The strategy to use when dealing with leftover bytes after removing the HTTPDecoder from the pipeline.

enableOutboundHeaderValidation

Whether the pipeline should confirm that outbound headers are well-formed. Defaults to true.

upgrade

Add a NIOHTTPClientUpgradeHandler to the pipeline, configured for HTTP upgrade. Should be a tuple of an array of NIOHTTPClientUpgradeHandler and the upgrade completion handler. See the documentation on NIOHTTPClientUpgradeHandler for more details.

Returns

An EventLoopFuture that will fire when the pipeline is configured.