Closed poppingmoon closed 1 year ago
Also, please append this change to misskey-websocket/CHANGELOG.md
.
Can you give me a use case for this change? I've once tried to implement
WebSocketClientBuilder::header
but I stopped because I don't have use case for this.
At the time of commit, I could not connect to misskey.io with websocket. I found posts that say they have avoided the problem by changing User-Agent. https://misskey.io/notes/9cn5c6qje7 So I made this change and it worked as a workaround.
It seems that this problem on misskey.io was fixed by now, but I think it is good to provide the option for future usage.
This PR allows users to add their custom headers to websocket requests. Added
header
method toWebSocketClientBuilder
so that they can be specified in the same way as that ofHttpClientBuilder
.