mirror of
https://github.com/apple/swift-http-types
synced 2026-11-24 04:37:51 +00:00
WebSocket uses the extended-CONNECT form in HTTP/2 and HTTP/3. When creating an HTTPRequest from a URLRequest, we should translate it into the new form. `:method`: `GET` -> `CONNECT` `:scheme`: `wss`/`ws` -> `https`/`http` `:protocol`: `websocket` HTTPTypes defaults to modern HTTP versions, and the expectation is that the HTTP/1 serializer has to translate the extended-CONNECT request back to the old request form. --------- Co-authored-by: Cory Benfield <lukasa@apple.com>