Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass options into ws instance #70

Merged
merged 2 commits into from Apr 3, 2020
Merged

Conversation

andrsyash
Copy link
Contributor

Not of all options are passed into ws instance now.
For example, without my suggestion, ws-server does not receive custom headers:
const Websocket = require('rpc-websockets').Client;
const options = {
autoconnect: true,
reconnect: false,
headers: { 'x-header1': 'x-header1', 'x-header2': 'x-header2' }
};
const ws = new Websocket('ws://localhost:8080', options);

Not of all options are passed into ws instance now.
For example, without my suggestion, ws-server does not receive custom headers:
const Websocket = require('rpc-websockets').Client;
const options = {
  autoconnect: true,
  reconnect: false,
  headers: { 'x-header1': 'x-header1', 'x-header2': 'x-header2' } 
};
const ws = new Websocket('ws://localhost:8080', options);
@mkozjak mkozjak self-requested a review April 3, 2020 06:05
Copy link
Member

@mkozjak mkozjak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrsyash: Nice! Could we add this to the API docs too?

@andrsyash
Copy link
Contributor Author

andrsyash commented Apr 3, 2020

@andrsyash: Nice! Could we add this to the API docs too?

Please guide me. Which file should I change?

@mkozjak
Copy link
Member

mkozjak commented Apr 3, 2020

Any other option allowed Node WebSocket
@andrsyash
Copy link
Contributor Author

@mkozjak I have done, please check.

@mkozjak
Copy link
Member

mkozjak commented Apr 3, 2020

Nice, tnx!

@mkozjak mkozjak merged commit 14536e1 into elpheria:master Apr 3, 2020
@andrsyash
Copy link
Contributor Author

@mkozjak I do not see changes in ./dist folder after commit 6abcff3.
Am I should build module myself?
Sorry for dumb question, i am a novice in github flows.

@mkozjak
Copy link
Member

mkozjak commented Apr 3, 2020

@andrsyash, sorry, my bad, it should be available in 5.1.1.

@andrsyash
Copy link
Contributor Author

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants