服务器响应状态为 429 (Too Many Requests) intlTelInput.js

the server responded with a status of 429 (Too Many Requests) intlTelInput.js(服务器响应状态为 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Update another component when Formik form changes(当Formik表单更改时更新另一个组件)
Formik validation isSubmitting / isValidating not getting set to true(Formik验证正在提交/isValiating未设置为True)
React Validation Max Range Using Formik(使用Formik的Reaction验证最大范围)
Validation using Yup to check string or number length(使用YUP检查字符串或数字长度的验证)
Updating initialValues prop on Formik Form does not update input value(更新Formik表单上的初始值属性不会更新输入值)
password validation with yup and formik(使用YUP和Formick进行密码验证)