Skip to content

HTTP receiver should not expose bookkeeping functions #135

Closed
@lance

Description

@lance

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?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions