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

feat: Abort and passthrough from an intercept #57

Merged
merged 2 commits into from
Jul 5, 2018
Merged

Conversation

offirgolan
Copy link
Collaborator

@offirgolan offirgolan commented Jul 3, 2018

Resolves #48.

server
  .get('/ping')
  .intercept((req, res, interceptor) => interceptor.abort());

server
  .get('/pong')
  .intercept((req, res, interceptor) => interceptor.passthrough());

@offirgolan offirgolan requested a review from jasonmit July 3, 2018 21:24
setDefaults(this);
}

abort() {
Copy link
Contributor

@jasonmit jasonmit Jul 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

abort() might confuse people that this is aborting requests, i.e., https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort

Copy link
Contributor

@jasonmit jasonmit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit around the naming of abort, otherwise LGTM.

@offirgolan
Copy link
Collaborator Author

What are your thoughts on eject instead?

@offirgolan offirgolan requested a review from jasonmit July 5, 2018 21:20
@offirgolan offirgolan merged commit 4ebacb8 into master Jul 5, 2018
@offirgolan offirgolan deleted the interceptor branch July 5, 2018 21:49
@offirgolan offirgolan restored the interceptor branch July 6, 2018 08:14
@offirgolan offirgolan deleted the interceptor branch July 6, 2018 08:14
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.

2 participants