[FEATURE] Option to control client's buffer for non-101 response body
Author: thorrezCreated Jul 18, 2025Updated Oct 18, 2025
Is there an existing feature request for this?
- I have searched the existing feature requests
Is your feature request related to a problem? Please describe.
I have a websocket client that sometimes receives error HTTP responses (non-101) from servers. I want the client to be able to read a lot of the response body.
Currently, it can only read 1024 bytes of the response body, due to https://github.com/gorilla/websocket/blob/e064f32e3674d9d79a8fd417b5bc06fa5c6cad8f/client.go#L367
Describe the solution that you would like.
I would like an option to set that buffer to be larger than 1024 bytes.
Describe alternatives you have considered.
No response
Anything else?
No response
Source: gorilla/websocket