gpt4 book ai didi

curl - Pingdom API 通过 curl 创建检查

转载 作者:行者123 更新时间:2023-12-01 10:16:33 25 4
gpt4 key购买 nike

我正在通过 api 创建一个 pingdom 检查,但是似乎 http 属性没有被接受,不确定我是否遗漏了语法中的某些内容。这是我使用的 curl ,

curl -X POST -u 'your@email:yourpassword' -H "app-key: app-key" -d 'name=new&type=http&port=443&host=www.mydomain.com' https://api.pingdom.com/api/2.0/checks

检查正在创建,但 HTTPPort 仍然是默认端口。有人可以建议任何解决方案来修复。


当通过 GUI 创建时,它允许为 HTTP 添加一个端口,在通过 GUI 创建的检查之一的 ig 请求之后,

{"check":{"id":1915300,"name":"test123","resolution":1,"sendtoemail":true,"sendtosms":false,"sendtotwitter":false,"sendtoiphone":false,"sendtoandroid":false,"sendnotificationwhendown":4,"notifyagainevery":60,"notifywhenbackup":true,"created":1450100471,"use_legacy_notifications":true,"type":{"http":{"url":"\/","encryption":true,"port":443,"requestheaders":{"User-Agent":"Pingdom.com_bot_version_1.4_(http:\/\/www.pingdom.com\/)"}}},"hostname":"mydomain.com","contactids":[10383440,10233710],"ipv6":false,"status":"up","lasterrortime":1453959166,"lasttesttime":1456295446,"lastresponsetime":151,"alert_policy":1077635,"alert_policy_name":"Alert immediately","acktimeout":0,"autoresolve":0,"tags":[],"probe_filters":[]}}

此处端口 443 分配给 HTTP 类型。

最佳答案

我可以看到您正在尝试使用 port=443,而这个 443 端口用于 ssl (https)。你不能将它用于 http。尝试使用其他端口,它应该适合您。

TCP port 443 is the standard TCP port that is used for website which use SSL. When you go to a website which uses the https at the beginning you are connecting to port 443

关于curl - Pingdom API 通过 curl 创建检查,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35597763/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com