使用cmd调用curl?

时间:2018-05-15 17:55:41

标签: curl cmd

我有以下curl命令,我想将.bat文件转换为使用cmd调用。

curl -X POST \
  https://api.telerivet.com/v1/projects/PJ331378e28e30b89f/messages/send \
  -H 'Authorization: Basic TFFWcHR6SkxMS0x2a1JwbDBKelBTMExnVHdQbzdybFM6' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: 6fde3920-a30d-4daa-9535-ac6373d492f8' \
  -d '{
    "content": "kjdjefk",
    "to_number": "+6586524931"

}'

但是得到以下错误。

enter image description here

1 个答案:

答案 0 :(得分:-1)

你走了:

curl -X POST ^
  https://api.telerivet.com/v1/projects/PJ331378e28e30b89f/messages/send ^
  -H 'Authorization: Basic TFFWcHR6SkxMS0x2a1JwbDBKelBTMExnVHdQbzdybFM6' ^
  -H 'Cache-Control: no-cache' ^
  -H 'Content-Type: application/json' ^
  -H 'Postman-Token: 6fde3920-a30d-4daa-9535-ac6373d492f8' ^
  -d '{^
    "content": "kjdjefk",^
    "to_number": "+6586524931"^
}'