feat: adding header support for client
This commit is contained in:
@@ -27,7 +27,9 @@ func main() {
|
||||
wsClient, err := client.NewSafeWebsocketClientBuilder().
|
||||
BaseHost("localhost").
|
||||
BasePort(8080).
|
||||
Path("/ws/test/data_1").
|
||||
Headers(map[string]string{
|
||||
"X-MBX-APIKEY": "abcd",
|
||||
}).Path("/ws/test/data_1").
|
||||
UseTLS(false).
|
||||
ChannelSize(1).
|
||||
Build(ctx)
|
||||
@@ -44,7 +46,7 @@ func main() {
|
||||
dataChannel := wsClient.DataChannel()
|
||||
|
||||
for data := range dataChannel {
|
||||
// _ = data
|
||||
fmt.Println(string(data))
|
||||
_ = data
|
||||
// fmt.Println(string(data))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user