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

Remove startRecording for HarRecorder #4

Open
juliandescottes opened this issue Feb 27, 2023 · 0 comments
Open

Remove startRecording for HarRecorder #4

juliandescottes opened this issue Feb 27, 2023 · 0 comments

Comments

@juliandescottes
Copy link
Member

The base HarRecorder doesn't need to subscribe to events (as it should be done by the consumer). So the call to startRecording is only there to reset the state before we record event.

Meaning we could make startRecording optional, and the first call to recordEvent could take care of resetting the state when needed. Or we can completely remove startRecording. This would leave us with only two public methods on this recorder: recordEvent and stopRecording.

Maybe we should just remove any notion of state from this class and just have two methods: recordEvent and exportAsHar, and then consumers would just create a new recorder for each record they want to build?

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