Skip to content

Conversation

@hamzahrmalik
Copy link
Contributor

Users should be able to use swift-configuration to create the http client configuration object

Changes

  • duplicate package.swift to create a separate version for 6.0 and 6.1, since Configuration is 6.2+
  • add helper to create http client configuration using ConfigReader

public init(configReader: ConfigReader) throws {
self.init()

// Each entry in the list should be a colon separated pair e.g. localhost:127.0.0.1 or localhost:::1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not comma-separated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

colon felt more natural to me for defining key-value pairs. I don't mind though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comma would probably make the ipv6 case slightly eaiser to parse too

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, comma might be used for splitting the pairs themselves e.g. in env vars. Hmm then comma isn't great, but colon is a bit confusing.

@czechboy0
Copy link

lgtm, I'll let the maintainers actually approve though 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants