Skip to content

Conversation

@Lori-Shu
Copy link

@Lori-Shu Lori-Shu commented Jul 30, 2025

I am tring to implement websocket in reqwest. Although there is lib like reqwest_websocket that has good support, most rely on tungstenite, I am wondering if I can remove the dependence ,please review.

@Lori-Shu
Copy link
Author

Lori-Shu commented Aug 7, 2025

@linyihai did my commits make sense or I just head to wrong direction? Still have no idea how to exact trailer map from response and pass to client, Do you think it is needed to be implemented? Please take a look when you are around. Thanks.

@seanmonstar
Copy link
Owner

Thanks for giving this a try!

I don't believe this is quite the direction that they were asking about. At least, what I understood from the issue is the desire to be able to access the trailers on any given response.

So, the addition of something like this:

impl Response {
    pub async fn trailers(&mut self) -> crate::Result<Option<HeaderMap>> {
        // get this from the `http_body::Body` trailers frame
    }
}

@Lori-Shu
Copy link
Author

Lori-Shu commented Aug 8, 2025

impl Response {
    pub async fn trailers(&mut self) -> crate::Result<Option<HeaderMap>> {
        // get this from the `http_body::Body` trailers frame
    }
}

I just write my version of fn trailers, Thanks for the instruction..

@Lori-Shu Lori-Shu changed the title try adding trailer support for http1 request try adding websocket support with no tungstenite dependence Sep 3, 2025
@Lori-Shu
Copy link
Author

Lori-Shu commented Sep 3, 2025

I have no idea if the Upgraded type is safe io parallel, Just want to make WebSocket type safe for parallel io.

@Lori-Shu
Copy link
Author

Lori-Shu commented Sep 7, 2025

I've tried #2812, maybe give you a possible solution or way, if I ran out of context again, sorry for your time. @seanmonstar

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

Successfully merging this pull request may close these issues.

2 participants