服务器响应状态为429(请求过多)intlTelInput.js [英] the server responded with a status of 429 (Too Many Requests) intlTelInput.js

查看:235
本文介绍了服务器响应状态为429(请求过多)intlTelInput.js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用intlTelInput.min.js通过此代码进行地理IP查找

I am using intlTelInput.min.js for geo IP lookup with this code

jQuery("#teephnumber").intlTelInput({
        allowExtensions: true,
        defaultCountry: "auto",
        setNumber: "Telephone number",
        geoIpLookup: function(callback) {
            $.get('http://ipinfo.io', function() {}, "jsonp").always(function(resp) {
              var countryCode = (resp && resp.country) ? resp.country : "";
              callback(countryCode);
            });
          },
        nationalMode: false,
        utilsScript: "/wp-content/themes/imc/js/utils.js"
    });

工作正常,但现在不在控制台中,我看到此错误:

it was working fine, but now not in console I see this error:

The server responded with a status of 429 (Too Many Requests), GET http://ipinfo.io/?callback=jQuery1112025137682701461017_1438183879450&_=1438183879451

没有任何JavaScript代码,因为这可行.这可能是什么原因?

And no javascript code because of this works.What can be the reason for this?

推荐答案

在此处查看速率限制: https://ipinfo.io/developers

See Rate limits here: https://ipinfo.io/developers

每天最多只能有1,000个API请求.如果您需要发出更多请求或需要SSL支持,请参阅我们的付费计划."

"You are limited to 1,000 API requests per day. If you need to make more requests, or need SSL support, see our paid plans."

我认为您需要为更多的请求付费,或者找到减少您提出的请求的方法.您可能可以缓存该位置,以便使用localstorage对每个用户仅查询一次.

I think you need to pay for more requests or find a way to reduce the requests you are making. You can probably cache the location so you only query once per user using localstorage.

这篇关于服务器响应状态为429(请求过多)intlTelInput.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆