Skip to content
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

Should NIOHTTP1 Swift HTTPTypes conversion code be made public? #215

Open
adam-fowler opened this issue Jan 3, 2024 · 1 comment
Open

Comments

@adam-fowler
Copy link
Contributor

adam-fowler commented Jan 3, 2024

I'm talking about the code that can be found here

The NIOWebSocket upgrade helpers are reliant on the NIOHTTP1 types, specifically HTTPHead and HTTPHeaders . If a project is built using the new HTTP Types it will need to convert from the supplied NIOHTTP1 types to the new types. In theory the project could have its own conversion code but it might be a good idea to make the NIOExtras conversion code the official implementation.

Another situation where this conversion is being made is in the OpenAPI transports. Both Vapor and Hummingbird rely on the NIOHTTP1 types and have to convert to the new HTTP types to pass on the HTTP request to the openapi runtime and convert back to return the HTTP response.

@Lukasa
Copy link
Contributor

Lukasa commented Jan 3, 2024

This sounds totally reasonable. A PR to make this change would be welcomed.

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

No branches or pull requests

2 participants