mirror of
https://github.com/apple/swift-nio-ssl
synced 2026-11-26 04:57:52 +00:00
* Add "/.idea" to the project's ignore file. Motivation: To develop with AppCode. Modifications: Add "/.idea" to the project's ignore file. Result: Add "/.idea" to the project's ignore file. * Provide an HTTPS example. (#12) Motivation: To provide an example for people to use swift-nio-ssl at their projects with ease. Modifications: - Add NIOHTTP1Client module. Result: A good example for getting started with swift-nio-ssl. * * Create OpenSSLHandler instance in channelInitializer function and chain adding handlers. * Make sendRequest function to return EventLoopFuture and cascade promise with it to properly finish application. * Accept command line argument. * Make channel closed after receiving HTTPClientResponsePart.end. Because if large response is returned, channelReadComplete is called twice or more times. * Add README.md for documenting command line argument. * Add Connection header with handling for channelInactive * Remove print and write bytes to stdout. * fix compile error for NIO2. * rename ctx to context * dependency on NIOFoundationCompat was missing
454 B
454 B
NIOHTTP1Client
This sample application provides a http client. Invoke it using one of the following syntaxes.
swift run NIOHTTP1Client # Gets a content on a server on ::1, port 4433, using SSL/TLS
swift run NIOHTTP1Client "https://example.com" # Gets a content on a server on example.com, port 443, using SSL/TLS
swift run NIOHTTP1Client "https://example.com:4433" # Gets a content on a server on example.com, port 4433, using SSL/TLS