同一条命令,在Linux下是成功的:
root@wudan:/home/wudan# curl -H 'Content-Type: application/json' -d '{"msgtype":"text","text":{"content":"IP is 100.1.1.7"}}' https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxx
{"errcode":0,"errmsg":"ok"}root@wudan:/home/wudan#
但是在Windows下就发送失败,提示json错误:
C:\Users\45409>curl -H 'Content-Type: application/json' -d '{"msgtype":"text","text":{"content":"IP is 100.1.1.7"}}' https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxx
curl: (6) Could not resolve host: application
{"errcode":40008,"errmsg":"Warning: wrong json format. invalid message type, hint: [1636501875_160_30dc0d3d0428d5540682ab25145ad6bd], from ip: 220.200.59.109, more info at https://open.work.weixin.qq.com/devtool/query?e=40008"}
你好,windows下已经报错了 Could not resolve host: application 无法解析主机吧
C:\>ping qyapi.weixin.qq.com
正在 Ping qyapi.weixin.qq.com [157.255.173.237] 具有 32 字节的数据:
来自 157.255.173.237 的回复: 字节=32 时间=25ms TTL=54
来自 157.255.173.237 的回复: 字节=32 时间=26ms TTL=54
来自 157.255.173.237 的回复: 字节=32 时间=25ms TTL=54
来自 157.255.173.237 的回复: 字节=32 时间=32ms TTL=54
157.255.173.237 的 Ping 统计信息:
数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 25ms,最长 = 32ms,平均 = 27ms
请问问题解决了 如何解决的 我现在也遇到这个问题了