【问题标题】:the server responded with a status of 429 (Too Many Requests) intlTelInput.js服务器响应状态为 429 (Too Many Requests) intlTelInput.js
【发布时间】:2015-10-20 16:46:47
【问题描述】:

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

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"
    });

它工作正常,但现在 不在控制台我看到这个错误:

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

因为这个工作没有javascript代码。这可能是什么原因?

【问题讨论】:

  • 没有代码我们需要像耶稣一样知道怎么回事
  • 已发布@messerbill

标签: javascript jquery geolocation


【解决方案1】:

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

“您每天限制为 1,000 个 API 请求。如果您需要发出更多请求或需要 SSL 支持,请参阅我们的付费计划。”

我认为您需要为更多请求付费,或者想办法减少您提出的请求。您可能可以缓存该位置,因此您只需使用本地存储为每个用户查询一次。

【讨论】:

  • 每天 1000 个来自一个国家或地区? @甜甜圈回复
  • 我想每天都有任何类型的请求。我对这项服务一无所知,您为什么不阅读文档?
  • 你可以使用ipinfo.io的替代服务stackoverflow.com/questions/14177647/…
猜你喜欢
  • 2021-07-12
  • 2021-12-31
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-08-14
  • 1970-01-01
  • 1970-01-01
  • 2021-12-13
相关资源
最近更新 更多