Angular 5,MEAN,如何将 API 获取请求限制为每分钟不超过 10 个

问题描述 投票:0回答:0

根据标题,我如何限制 API 请求的数量。 是否可以使用缓存系统,以便当达到限制时,系统返回缓存。直到再次低于限制?

最好的方法是什么?

var marketCapURL = "https://api.xxx.xx"
const proxyurl3 = "https://cors-anywhere.herokuapp.com/";   
const url3 = ""; // site that doesn’t send Access-Control-*
           fetch(proxyurl3 + marketCapURL) 
           .then(response => response.json())
           .then(contents => {  
            this.array = contents;
    

angular fetch-api limit
© www.soinside.com 2019 - 2024. All rights reserved.