Files
swift-nio-ssl/Sources/NIOSSLHTTP1Client
Cory Benfield 9c457d021e Rationalise TLSConfiguration construction. (#299)
Motivation:

Currently whenever we add new config to TLSConfiguration, we add a new
static factory function that needs to provide the field. This is because
we currently allow configuration primarily by way of initializers. This
is increasingly not scaling, leading to a proliferation of almost
identical static factory functions.

We can replace this proliferation by having only "default" constructions
that default basically everything, and then having users use
getters/setters to initialize things. This also works well when we have
multiple ways of interacting with config, e.g. with the various cipher
suite operations.

Modifications:

- Deprecate all existing factory functions.
- Replace with two: forClient() and
  forServer(certificateChain:privateKey:). These configure only the
  mandatory things for each mode.
- Replace all uses of the deprecated initializers with the new ones,
  configuring fields manually as needed.

Result:

More consistent configuration objects.
2021-05-14 08:52:26 +01:00
..

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