我正在尝试发出解析到特定IP的cURL请求。从我所读到的一切来看,这看起来在语法上是正确的,但我仍然看到“无法解析主机错误”。谁能给我指个方向?我看到了各种错误:
curl —-resolve e-dinar.io:443:42.81.15.75 "https://e-dinar.io"
IDN support not present, can't parse Unicode domains
* getaddrinfo(3) failed for —-resolve:80
curl —-resolve e-dinar.io:443:42.81.15.75 "https://e-dinar.io:443"
curl: (6) Couldn't resolve host '—-resolve'
curl: (6) Couldn't resolve host 'e-dinar.io:443'
curl "https://e-dinar.io:443" —-resolve e-dinar.io:443:42.81.15.75
curl: (6) Couldn't resolve host '—-resolve'
curl: (6) Couldn't resolve host 'e-dinar.io:443'
有什么想法是我错了吗?谢谢。
发布于 2016-07-25 17:22:30
您在curl命令(—
)中使用了错误的-
,请将—-
更改为--
。在这里的curl
响应中有一个提示:
curl: (6) Couldn't resolve host '—-resolve'
curl试图从—-resolve
主机获取数据,但由于错误的-
,它不会将其解析为命令。
https://stackoverflow.com/questions/38563967
复制相似问题