Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

How to get response header? #272

Open
lewiszlw opened this issue Jan 12, 2023 · 0 comments
Open

How to get response header? #272

lewiszlw opened this issue Jan 12, 2023 · 0 comments

Comments

@lewiszlw
Copy link

lewiszlw commented Jan 12, 2023

Hi,
I'm using this crate as websocket client, I want to know how to get response header?
My code like below,

let ws_client = ClientBuild:new(...)...;
let (mut ws_read, mut ws_write) = ws_client.split.unwrap();

// write loop
std::thread::spawn(move || {
    loop {
        ws_write.send_message(...);
    }
});

// read loop
std::thread::spawn(move || {
    for message in ws_read.incomming_messages() {
        // I want to get response header here.
         ...
    }
});

Or how to get response header in handshaking?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant