ngneat / cashew

🐿 A flexible and straightforward library that caches HTTP requests in Angular
https://www.netbasal.com
MIT License
682 stars 33 forks source link

feat: add parameter encoder override #14

Closed mokipedia closed 4 years ago

mokipedia commented 4 years ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Currently, as the request gets cloned and a new HttpParams object is created, there is currently no way to set the encoder (neigher globally, nor for each request)

Issue Number: #13

What is the new behavior?

A new optional config option is added to provide the HttpParameterCodec used for cached requests.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

NetanelBasal commented 4 years ago

Thanks. Please add yourself to the contributors' list. Run npm run contributors:add.

mokipedia commented 4 years ago

done