curl.exeに渡すPOSTデータで予期せぬ引用符の展開を防ぐ変数にPOSTデータを入れておく (PowerShell) $json = @'
{
"foo": 1,
"bar": [1, 2, 3]
}
'@
$json | curl.exe -H "Content-Type: application/json" -XPOST http://test.com/ -d@-
ファイルにPOSTデータを書いておくnotepad.exe test.json curl.exe -H "Content-Type: application/json" -XPOST http://test.com/ -d@'test.json' 参考 |
|