IPV6 Curl POST request

断了今生、忘了曾经 提交于 2019-12-06 08:49:22
curl -g -d post 'http://[2001:0:db8:1111:0:0:0:11]:8091/'

The -g option was necessary "back in the old days" when you used IPv6 addresses. It stops curl from treating the [] symbols in the URL as globbing instructions. (since curl 7.37.0 (May 2014), curl no longer mistakes numerical IPv6 addresses for globbing, making the use of -g in this case no longer necessary)

The -d is of course for posting. You can slap on a -v too to get to see details from the operation.

curl -4 for an IPv4 request and curl -6 for an IPv6 request are the arguments, that you can use.

For your examle, this should work:

curl -6 -d post 'http://2001:0:db8:1111:0:0:0:11:8091/'

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!