J0 / phoenix_gen_socket_client

Socket client behaviour for phoenix channels
MIT License
232 stars 48 forks source link

Allow passing options to websocket_client #52

Closed albertored closed 3 years ago

albertored commented 3 years ago

:websocket_client supports these options:

%% Supported Opts: %% - {keepalive, integer()}: keepalive timeout in ms %% - {extra_headers, list({K, V})}: a kv-list of headers to send in the handshake %% (useful if you need to add an e.g. 'Origin' header on connection. %% - {ssl_verify, verify_none | verify_peer | {verifyfun, }} : this is passed %% through to ssl:connect/2,3.

This PR allows to set only the :extra_headers and :ssl_verify one (I need :extra_headers for adding an Authorization header to the connect request). I haven't added also the :keepalive one because I think is already handled in other ways but if you think it's useful we can add it too.

albertored commented 3 years ago

Sure, I will push the changes tomorrow

edongashi commented 3 years ago

We will make a minor release with your changes soon.

sebastian commented 3 years ago

3.2.0 release has been made. Thanks for the pull-request @albertored.