You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[x] Support request
[ ] Other... Please describe:
Current behavior
I currently use a standard request to an API that needs Headers:
however realise get() expects 2 arguments and not 3. Not sure how to work out where to put withCache() if I'm also using headers.
What is the motivation / use case for changing the behavior?
The API I'm using has usage limits so I'd like to cache the request (for 7 days) on the users device on the first use so as to limit hitting the API ... Cashew seems to be a great option for this use case ;-)
Environment
Angular version: 9.1.0
@ngneat/cashew 1.1.4
Browser:
- [x ] Chrome (desktop) version 80.0.3987.163
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
For Tooling issues:
- Node version: v12.13.0
- Platform: Mac
The text was updated successfully, but these errors were encountered:
Awesome thanks mate :-) Works like a charm and caching perfectly. Love reading your articles ... just starting my Angular journey and learning so much :-)
I'm submitting a...
Current behavior
I currently use a standard request to an API that needs Headers:
return this.http.get<ITideResults>(this.tideServiceURL, { headers: this.headers })
Expected behavior
Expected to be able to continue to use Headers as well as caching :-)
Minimal reproduction of the problem with instructions
Following the docs I tried:
return this.http.get<ITideResults>(this.tideServiceURL, { headers: this.headers }, withCache())
however realise get() expects 2 arguments and not 3. Not sure how to work out where to put withCache() if I'm also using headers.
What is the motivation / use case for changing the behavior?
The API I'm using has usage limits so I'd like to cache the request (for 7 days) on the users device on the first use so as to limit hitting the API ... Cashew seems to be a great option for this use case ;-)
Environment
The text was updated successfully, but these errors were encountered: