gagliardetto / solana-go

Go SDK library and RPC client for the Solana Blockchain
Apache License 2.0
943 stars 267 forks source link

Add ws connect method with http header parameter #72

Closed blewater closed 2 years ago

blewater commented 2 years ago

Hello,

A new connect method is needed that accepts a requestHeader http.Header parameter that passes that to the DialContext method. The existing is missing it. https://github.com/gagliardetto/solana-go/blob/2acfcf2684c6dca9a9ae67126d09abc910c3a3fd/rpc/ws/client.go#L56 Reason: if you plan to pass in a user password for authentication, this is the prescribed way. gorilla WebSocket basic authentication

Thanks for enriching the Solana ecosystem with a Go SDK!