将卷曲导入邮递员

时间:2018-02-08 11:03:21

标签: curl postman

我正在使用具有以下卷曲的api端点。当我将curl导入postman时,键列中会填充键和值。

enter image description here

curl "https://{{Environments}}/v1/initiate" \
-H "Authorization: Bearer {accessToken}"
-X POST \
-d '{
      "clientId": "1234",
      "password": "5678",
      "pairingCode": "9101112"
     }'

1 个答案:

答案 0 :(得分:1)

尝试在请求中添加-H "Content-Type: application/json"标头:

curl "https://{{Environments}}/v1/initiate" \
-H "Authorization: Bearer {accessToken}" \
-H "Content-Type: application/json" \
-X POST \
-d '{
      "clientId": "1234",
      "password": "5678",
      "pairingCode": "9101112"
    }'

当我将上面的代码复制到邮递员时:

Postman