I am making an http call on Submit button but I want to limit that calls (say 10 successful calls) per day. Can you Please tell me , how can we implement that in Angular 4/5?
Many Thanks.
Angular
are front-end frameworks. You need a back-end application for this implementation.
Redis
or other cache solutions. INCR
command. EXPIRE
time to reset a limitation as well. Redis
are not traditional DBs, which means you don't need to waste extra DB queries to do this implementation.
You'll need a backend with a DB counting the number of requests you made that day, and before sending a new request check that DB if the quota hasn't been passed.
saving data across all clients on the front end is not something you can do.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.