Instance Methodswift-nio 2.72.0NIOHTTP1->NIOCore
addHTTPClientHandlers(position:leftOverBytesStrategy:enableOutboundHeaderValidation:withClientUpgrade:)
Configure a ChannelPipeline
for use as a HTTP client.
func addHTTPClientHandlers(position: Position = .last, leftOverBytesStrategy: RemoveAfterUpgradeStrategy = .dropBytes, enableOutboundHeaderValidation: Bool = true, withClientUpgrade upgrade: NIOHTTPClientUpgradeConfiguration? = 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 ofNIOHTTPClientUpgradeHandler
and the upgrade completion handler. See the documentation onNIOHTTPClientUpgradeHandler
for more details.
Returns
An EventLoopFuture
that will fire when the pipeline is configured.
Other members in extension
Instance members
func addHTTPClientHandlers(position: Position, leftOverBytesStrategy: RemoveAfterUpgradeStrategy
) -> EventLoopFuture<Void> Configure a
ChannelPipeline
for use as a HTTP client.func addHTTPClientHandlers(position: Position, leftOverBytesStrategy: RemoveAfterUpgradeStrategy, enableOutboundHeaderValidation: Bool, encoderConfiguration: HTTPRequestEncoder.Configuration, withClientUpgrade: NIOHTTPClientUpgradeConfiguration?
) -> EventLoopFuture<Void> Configure a
ChannelPipeline
for use as a HTTP client.func addHTTPClientHandlers(position: Position, leftOverBytesStrategy: RemoveAfterUpgradeStrategy, withClientUpgrade: NIOHTTPClientUpgradeConfiguration?
) -> EventLoopFuture<Void> Configure a
ChannelPipeline
for use as a HTTP client with a client upgrader configuration.func configureHTTPServerPipeline(position: ChannelPipeline.Position, withPipeliningAssistance: Bool, withServerUpgrade: NIOHTTPServerUpgradeConfiguration?, withErrorHandling: Bool
) -> EventLoopFuture<Void> Configure a
ChannelPipeline
for use as a HTTP server.func configureHTTPServerPipeline(position: ChannelPipeline.Position, withPipeliningAssistance: Bool, withServerUpgrade: NIOHTTPServerUpgradeConfiguration?, withErrorHandling: Bool, withOutboundHeaderValidation: Bool
) -> EventLoopFuture<Void> Configure a
ChannelPipeline
for use as a HTTP server.func configureHTTPServerPipeline(position: ChannelPipeline.Position, withPipeliningAssistance: Bool, withServerUpgrade: NIOHTTPServerUpgradeConfiguration?, withErrorHandling: Bool, withOutboundHeaderValidation: Bool, withEncoderConfiguration: HTTPResponseEncoder.Configuration
) -> EventLoopFuture<Void> Configure a
ChannelPipeline
for use as a HTTP server.func configureUpgradableHTTPClientPipeline<UpgradeResult>(configuration: NIOUpgradableHTTPClientPipelineConfiguration<UpgradeResult>
) -> EventLoopFuture<EventLoopFuture<UpgradeResult>> Configure a
ChannelPipeline
for use as an HTTP client.func configureUpgradableHTTPServerPipeline<UpgradeResult>(configuration: NIOUpgradableHTTPServerPipelineConfiguration<UpgradeResult>
) -> EventLoopFuture<EventLoopFuture<UpgradeResult>> Configure a
ChannelPipeline
for use as an HTTP server.