mirror of
https://github.com/apple/swift-nio-ssl
synced 2026-11-24 04:38:08 +00:00
Motivation: With NIO 2.32.0 we broke the core NIO module up into modules that split apart the POSIX layer and the core abstractions. As a result, this package no longer needs to express a hard dependency on the POSIX layer. Modifications: - Rewrote imports of NIO to NIOCore. - Added NIOEmbedded and NIOPosix imports where necessary in tests. - Extended soundness script to detect NIO imports. - Note that the main modules still depend on NIO, which is necessary for backwards-compatibility reasons. This dependency is unused. Result: No need to use NIOPosix.
NIOSSLHTTP1Client
This sample application provides a https client. Invoke it using one of the following syntaxes.
swift run NIOSSLHTTP1Client # Gets a content on a server on ::1, port 4433, using SSL/TLS
swift run NIOSSLHTTP1Client "https://example.com" # Gets a content on a server on example.com, port 443, using SSL/TLS
swift run NIOSSLHTTP1Client "https://example.com:4433" # Gets a content on a server on example.com, port 4433, using SSL/TLS