Skip to content

Adopt the new shared HTTP client #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

czechboy0
Copy link
Collaborator

Motivation

Now that SwiftNIO/AsyncHTTPClient have a singleton variant of the EventLoopGroup, which allows creating an HTTPClient without any argument, let's simplify the initializer of the transport to take advantage of it - bringing it in line with the URLSession transport.

Modifications

Default the HTTPClient to a new one with a default event loop group, and remove the mandatory shutdown call.

Result

Adopters can more easily create the AHC transport.

Test Plan

N/A

Copy link
Collaborator

@dnadoba dnadoba left a comment

Choose a reason for hiding this comment

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

LGTM

@czechboy0
Copy link
Collaborator Author

@swift-server-bot test this please

@czechboy0 czechboy0 merged commit 91dfd35 into swift-server:main Aug 29, 2023
@czechboy0 czechboy0 deleted the hd-shared-client branch August 29, 2023 12:45
@czechboy0 czechboy0 added the 🔨 semver/patch No public API change. label Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants