-
Notifications
You must be signed in to change notification settings - Fork 652
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
Support For Swift-HTTP-Types #2758
Comments
I am currently using the conversion channel handlers in https://github.com/apple/swift-nio-extras/tree/main/Sources/NIOHTTPTypesHTTP1. But would love to see conversion straight to swift-http-types instead of going via the types in NIOHTTP1, but that would require implementing the whole of NIOHTTP1 using the new types so upgrade handlers etc are available. |
I would love to have swift-http-types supported. We're currently paying conversion costs |
I think at this point we should consider cutting over to the common types. |
@Lukasa So like in/with a new major version? |
I don’t think that’s necessary. We can deprecate the old APIs and keep them around. |
Ah ok that was kind of what I was thinking about as well, which made me think about "package traits". |
Bump - any thoughts on this? May i consider putting together a PR for this? |
This is more than just writing an encoder, decoder for the HTTP types. You also need to provide the other support channel handlers like pipelining, response header validation, error handling and client and server pipeline upgrades. Of course the encoder/decoder would be the starting point. |
Yeah, Adam is right that this is a bit of a changeover, but if you want to start with the encoder/decoder I think that's a good first step. I think we end up needing the following items changed (@adam-fowler please shout if I've missed anything):
This is, I hope it's fairly easy to see, a fairly substantial chunk of work. While we do this I think the various types should remain internal to avoid exposing a partial new API, and to allow us to fix any mistakes in the flow. But we will happily accept PRs from folks who want to start cutting things over. |
@Lukasa one thing missed from this, Is what to do with the swift-nio-extras modules that we currently use to support the swift http types.
|
My preference would be yes, as we want to keep the access to the decoder and other types.
Yes, but that work is on a different schedule.
Agreed. |
What are the plans of this package to support swift-http-types?
The best plan I can come up with is to use the Swift 6 package traits to have an option to switch to those types?
The text was updated successfully, but these errors were encountered: