the server responded with a status of 429 (Too Many Requests) intlTelInput.js(服务器响应状态为 429 (Too Many Requests) 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/开发人员
您每天限制为 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."
我认为您需要为更多请求付费,或者想办法减少您提出的请求.您可能可以缓存该位置,因此您只需使用本地存储为每个用户查询一次.
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 (Too Many Requests) intlTelInput.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:服务器响应状态为 429 (Too Many Requests) intlTelInput.js


- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01
- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- addEventListener 在 IE 11 中不起作用 2022-01-01
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- 失败的 Canvas 360 jquery 插件 2022-01-01
- Fetch API 如何获取响应体? 2022-01-01
- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- 400或500级别的HTTP响应 2022-01-01
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07