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 function support for server addSoapHeader #977

Merged
merged 1 commit into from
Oct 3, 2017

Conversation

atavakoli
Copy link
Contributor

The purpose of this enhancement is to allow outgoing server headers to be
customized with information from the associated request. For servers only,
the soapHeader to addSoapHeader and changeSoapHeader can be a function,
which is called with the following arguments for each received request:

  • methodName The name of the request method
  • args The arguments of the request
  • headers The headers in the request
  • req The original request object

The return value of the function must be an Object({rootName: {name: 'value'}})
or strict xml-string, which will be inserted as an outgoing header of the
response to that request.

The purpose of this enhancement is to allow outgoing server headers to be
customized with information from the associated request. For servers only,
the `soapHeader` to addSoapHeader and changeSoapHeader can be a function,
which is called with the following arguments for each received request:

 - `methodName`     The name of the request method
 - `args`           The arguments of the request
 - `headers`        The headers in the request
 - `req`            The original request object

The return value of the function must be an Object({rootName: {name: 'value'}})
or strict xml-string, which will be inserted as an outgoing header of the
response to that request.
@coveralls
Copy link

coveralls commented Oct 2, 2017

Coverage Status

Coverage increased (+0.03%) to 93.59% when pulling cbe5758 on atavakoli:dynamic-outgoing-server-headers into 9aeceec on vpulim:master.

@herom
Copy link
Contributor

herom commented Oct 3, 2017

Thanks a lot @atavakoli 👍

@herom herom merged commit 9399cad into vpulim:master Oct 3, 2017
@atavakoli
Copy link
Contributor Author

@herom 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.

3 participants