Open juzeon opened 6 months ago
Upgrading from http to websocket, you must use http1 protocol instead of http2 protocol
If you know rust, you can refer to: https://github.com/gngpp/reqwest-impersonate
The missing HTTP1 protocol is not the only issue. For that to work tls_client
must return a reference to the socket connected to the target server so it can be used by the websocket
library.
I made tls_client use HTTP1 but got the following error from the websocket library
failed to WebSocket dial: response body is not a io.ReadWriteCloser: *http.cancelTimerBody
I think fResp.Body
must be a io.ReadWriteCloser
.
Describe the feature / enhancement and how it would improve things
Hello. Thanks for the library!
I'm not sure how it can work with Websocket. Typically I use this library, which requires a http client:
Describe how your proposal will work, with code and/or pseudo-code
I have tried to implement a fake RoundTripper by:
And use like this:
But I got this:
Thanks in advance!