转:https://stackoverflow.com/questions/8333920/passing-a-url-with-brackets-to-curl
问题:
curl -X GET -H 'Content-Type: application/json' -H 'Date: 1666324656' -H 'https://rule.cn/api/pcap/downloadForTest?body=[1290,1290]'
curl: (3) [globbing] error: bad range specification after pos ..
解决:
Add -g
to your command:
-g, --globoff
This option switches off the "URL globbing parser". When you set this option, you can
specify URLs that contain the letters {}[] without having curl itself interpret them.
Note that these letters are not normal legal URL contents but they should be encoded
according to the URI standard.
Example:
curl -g "https://example.com/{[]}}}}"
没有评论:
发表评论