Closed Hainesy closed 6 years ago
you might be able to do something like this by overriding the responseInterceptor() method. if you send a request to a particular URL that would not be returned by the service; then match that url and return the response you need from wherever.
I understand the need to return complex objects from real web APIs. The problem is that simulating all possible APIs and their structures is beyond the intention of this library which is to support the Angular documentation samples. The responseInterceptor may be the way to go.
Closing because we have no intention of pursuing this idea (worthy as it might be) . If you come up with a way to do it and a PR, we'd certainly consider that.
Our API urls will probably be more nested than what in-memory-web-api seems to allow. Is there any way to customise the url per collection? Or do we have to create separate feature modules to get around this?