vapor / http

🚀 Non-blocking, event-driven HTTP built on Swift NIO.
MIT License
238 stars 65 forks source link

HTTPClient re-use bootstrap #341

Open tanner0101 opened 5 years ago

tanner0101 commented 5 years ago

https://apple.github.io/swift-nio/docs/current/NIO/Classes/ClientBootstrap.html mentions:

Usually you re-use a ClientBootstrap once you set it up and called connect multiple times on it. This way you ensure that the same EventLoops will be shared across all your connections.

HTTPClient is tied to an event loop, so this should be possible.