Swiftpack.co - Package - amzn/smoke-http

Build - Master Branch Linux Swift 4.1 Compatible Swift 4.1 Compatible Apache 2


SmokeHTTP contains the library SmokeHTTPClient which will allow someone building a specific client that requires unique use-cases for HTTP parameters to utilize a generic HTTPClient that allows the user to implement their own delegates that handles client-specific HTTP logic.

The benefit of this package is to consolidate all HTTPClient logic into one location, while other clients are built to utilize this client while defining their own specific delegates.


To use SmokeHTTPClient, a user can instantiate an HTTPClient in the constructor of their specific client with instantiated delegates (HTTPClientDelegate, HTTPClientChannelInboundHandlerDelegate) that are defined by the client-specific logic.


This library is licensed under the Apache 2.0 License.


Stars: 24
Help us keep the lights on

Used By



0.6.1 - Jan 4, 2019

Allow higher level components to decode a path into a Shape seperate to decoding it into a Swift type.

0.6.0 - Dec 19, 2018

This release is moving the library closer to finalized APIs for version 1.0. It has some breaking changes-

  • The execute*WithOutput APIs of HTTPClient now produce an instance conforming to HTTPResponseOutputProtocol. This is analogous to the input type HTTPRequestInputProtocol for these methods and provides access to decoded headers from the response.
  • The HTTPClientDelegate.getTLSConfiguration() function now returns an optional TLSConfiguration. If nil is returned, a client will use http rather than https.
  • The QueryCoder package has been moved to QueryCoding.
  • The HTTPClient now needs to be explicitly closed using the close() API. The wait() can be used to block until the client is completely shut down. This was a recommendation from the SwiftNIO team (@weissi).

The are also some additions-

  • The QueryCoder (now QueryCoding) package has been joined with HTTPHeadersCoding and HTTPPathCoding for encoding/decoding headers and paths respectively.
  • The HTTPClient can now be used with an existing EventLoopGroup; it may be more efficient for an application to share ELGs across clients and/or other components. This was also a recommendation from the SwiftNIO team (@weissi).