cURL命令后不工作在Windows命令提示符,因为使用单引号

编程

复制文档的

curl --user rest-admin:test -H "Content-Type: application/json" -X POST -d "{ "processDefinitionKey":"holidayRequest", "variables": [ { "name":"employee", "value": "John Doe" }, { "name":"nrOfHolidays", "value": 7 }]}" http://localhost:8080/flowable-rest/service/runtime/process-instances

解决方案:

cURL命令后不工作在Windows命令提示符,因为使用单引号,

把单引号改成双引号,把类似 { "name":"nrOfHolidays", "value": 7 } 中的双引号使用 "" 转义一下.即可.

修改后完整版如下:

curl --user rest-admin:test -H "Content-Type: application/json" -X POST -d "{ "processDefinitionKey":"holidayRequest", "variables": [ { "name":"employee", "value": "John Doe" }, { "name" :"nrOfHolidays", "value": "7" }]}" http://localhost:8080/flowable-rest/service/runtime/process-instances

以上是 cURL命令后不工作在Windows命令提示符,因为使用单引号 的全部内容, 来源链接: utcz.com/z/512858.html

回到顶部