Azolo / websockex

An Elixir Websocket Client
MIT License
515 stars 97 forks source link

send params to websocket server #68

Closed floodico closed 5 years ago

floodico commented 5 years ago

Hello! I need to send some params to websocket server to check them during the connection... how can i do it?

floodico commented 5 years ago

that's my connection log on server:

screen shot 2018-12-26 at 11 47 19

as can you see my parameters are empty. Can i pass some parameters there?

Azolo commented 5 years ago

Probably via the query string on the URL.

That's normally where servers grab "parameters".

floodico commented 5 years ago

@Azolo yes, this really works. thank you! But what if I have a large map of parameters? Is this the only way to send them to the server?

Azolo commented 5 years ago

@floodico Yes

Azolo commented 5 years ago

@floodico I think I possibly misinterpreted your question the first time.

You can manually build a WebSockex.Conn struct that may be easier to manipulate.