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

Enable httpOptions to be an async function #9

Open
austinamorusoyardstick opened this issue Jan 28, 2023 · 0 comments
Open

Enable httpOptions to be an async function #9

austinamorusoyardstick opened this issue Jan 28, 2023 · 0 comments

Comments

@austinamorusoyardstick
Copy link

This would allow returning different headers per connection

Change

let opts = this._opts.httpOptions;

and other usage of it as well to

let opts = await isFunction(this._opts.httpOptions) ? this._opts.httpOptions(id) : this._opts.httpOptions;

isFunction should check for both functions and async function

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

No branches or pull requests

1 participant