brookshi / Hitchhiker

a Restful Api test tool
http://www.hitchhiker-api.com
Other
2.19k stars 402 forks source link

ipv6网络请求报错 #183

Open andwis opened 6 years ago

andwis commented 6 years ago

提示: 没有响应 { "message": "connect ENETUNREACH 2001:470:c:*::2:7073", "stack": "Error: connect ENETUNREACH 2001:470:c:**::2:7073\n at Object._errnoException (util.js:1022:11)\n at _exceptionWithHostPort (util.js:1044:20)\n at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1198:14)" }

ipv4测试可以. 在jmeter上测试,ipv4与ipv6皆正常。

brookshi commented 6 years ago

今天查了下,原来ipv6地址取数据要加上中括号 [], 格式如:http://[2607:f8b0:4005:802::1010]:端口/ 参考:https://stackoverflow.com/questions/19788188/get-html-from-webpage-using-ipv6-address-and-javascript