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

Add the ability to send an action containing several headers with the same name #9

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jaunis
Copy link

@jaunis jaunis commented Feb 26, 2020

The library does not allow sending an action containing several headers with the same name, although this is required for some specific actions (the Variable header in MessageSend for instance).

This pull request adds this ability without changing the usual action semantics. A new function multivalAction() instantiates a special class which allows specifying several times the same header.

Example:

var action = client.multivalAction('MyAction');
action.MyHeader = 'myvalue';
action.MyHeader = 'another_value';

will result in:

Action: MyAction
MyHeader: myvalue
MyHeader: another_value

Such an action can be instantiated with the new function multivalAction()
@coveralls
Copy link

coveralls commented Feb 26, 2020

Coverage Status

Coverage increased (+0.2%) to 97.222% when pulling 2114629 on jaunis:master into 674e88d on BelirafoN:master.

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

3 participants