-
Notifications
You must be signed in to change notification settings - Fork 829
Closed
Labels
Description
This is a question about addRequestInterceptor.
Despite having access to the initial request URL (that is created by the URL builder), it doesn't seem to allow me to change the URL that ends up being used, I could be wrong.
My use case is this :
- My data is stored as static JSON files on github pages.
- I use angular
- I'm building a resource that pulls collections or a single item based on a reference like
api/recipe/453
I'd like to transform the request url on the .one(453) from api/recipe/453/data.json to merely api/recipe/data.json then pull out the item with id matching 453 using some lodash.
I feel that addRequestInterceptor meets all but one of those needs (that of rewriting the eventual url used).
Can you clarify if addRequestInterceptor makes it possible to do the following:
- change the URL used to make the request
- manipulate the data retrieved with something like lodash
- use cached data instead of making http requests.
Reactions are currently unavailable