Skip to content
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

Catch error response headers with connect_async? #56

Open
serzhiio opened this issue Mar 12, 2019 · 1 comment
Open

Catch error response headers with connect_async? #56

serzhiio opened this issue Mar 12, 2019 · 1 comment

Comments

@serzhiio
Copy link

In some conditions i'm getting Http(429) error code, but i need to get additional headers of response like Retry-After, how could i make it?

@daniel-abramov
Copy link
Member

To support that, some changes in tungstenite-rs (a core of tokio-tungstenite) are required. Currently we don't copy the full response when the error happens, but it's possible to do so (and is not complex to achieve), basically we need to return the headers of Response in this function.

gregates pushed a commit to gregates/tokio-tungstenite that referenced this issue Feb 24, 2024
Make `Close` part of the `Message` enum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants