使用单个 curl 命令发送多个 POST 请求

时间:2021-03-29 16:08:00

标签: curl

Curl 允许通过使用 {a,b} 作为不同变量输入的单个命令发出多个 GET 请求,例如

curl 'https://suggestqueries.google.com/complete/search?client={firefox,chrome}&q=potato&hl=en' -o '#1_tst'

有没有办法对 POST 请求做同样的事情?我试过了

curl 'https://suggestqueries.google.com/complete/search' -X POST --data 'client={chrome,firefox}&q=potato&hl=en' -o '#1_tst'

这会导致写出名为 "#1_tst" 的单个文件。 (这个特定的示例请求无论如何都会失败,但我希望发出两个单独的请求)。

0 个答案:

没有答案