Skip to content

HTTP receiver should not expose bookkeeping functions #135

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

Closed
lance opened this issue May 7, 2020 · 0 comments · Fixed by #172
Closed

HTTP receiver should not expose bookkeeping functions #135

lance opened this issue May 7, 2020 · 0 comments · Fixed by #172
Assignees
Labels
type/enhancement New feature or request

Comments

@lance
Copy link
Member

lance commented May 7, 2020

In receiver_binary.js there is a check() function which is used to validate the input. It is currently defined on BinaryHTTPReceiver.prototype but I don't think it should be exposed at all. It's the SDK's job to check input and validate it, not the user of the SDK, so why expose it? I suspect it's useful for testing. In fact, that's how the tests are written at the moment. The same exists for the structured receiver.

Since the parse() function already calls check(), I think it's reasonable to remove this function from the prototype and make it internal to the module.

Are there any objections to this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant