Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Conversation

Drynwynn
Copy link

@Drynwynn Drynwynn commented Jul 8, 2017

In our project we wanted to be able to POST to a certain path we had mocked using the in-memory-web-api, but wanted to retain the ability for POST to add collection items without having to reinvent the wheel. It was not immediately apparent if our service had access to its controlling service object to call the collectionHandler() method, so we just modified the service to accept a null return to continue default processing. Submitting here in case it is found useful to others.

Allow an HTTP interceptor method to return null to signal to the
service that it should run the collection handler or the fallback
handler for the request.
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

@Drynwynn
Copy link
Author

Drynwynn commented Jul 8, 2017 via email

@googlebot
Copy link

CLAs look good, thanks!

Copy link
Contributor

@wardbell wardbell left a comment

Choose a reason for hiding this comment

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

I really like your idea.

I'm refactoring heavily to support Angular's "new" HttpClient so I can't merge your code exactly as written. I'll have to close this PR.

But I'm definitely taking it as you can see in PR #130. Thanks!

@wardbell
Copy link
Contributor

wardbell commented Sep 5, 2017

Closing for reason give in my review. See PR #130

@wardbell wardbell closed this Sep 5, 2017
wardbell added a commit that referenced this pull request Sep 5, 2017
- refactor to support tests
- correct bugs and clarify choices as result of test
- add new configuration options
- POST commands/resetDb` passes the request to the `resetDb` method
- when HTTP method interceptor returns null/undefined, continue with default request processing.
- reorganize files into src/app and src/in-mem
- adjust gulp tasks accordingly

closes #123. closes #128. closes #120.
wardbell added a commit that referenced this pull request Sep 5, 2017
- refactor to support tests
- correct bugs and clarify choices as result of test
- add new configuration options
- POST commands/resetDb` passes the request to the `resetDb` method
- when HTTP method interceptor returns null/undefined, continue with default request processing.
- reorganize files into src/app and src/in-mem
- adjust gulp tasks accordingly

closes #123. closes #128. closes #120.
@Drynwynn
Copy link
Author

Drynwynn commented Sep 5, 2017

Thanks Ward! Good luck on the refactor.

wardbell added a commit that referenced this pull request Sep 8, 2017
- refactor to support tests
- correct bugs and clarify choices as result of test
- add new configuration options
- POST commands/resetDb` passes the request to the `resetDb` method
- when HTTP method interceptor returns null/undefined, continue with default request processing.
- reorganize files into src/app and src/in-mem
- adjust gulp tasks accordingly

closes #123. closes #128. closes #120.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants