标签: curl postman
我正在使用具有以下卷曲的api端点。当我将curl导入postman时,键列中会填充键和值。
curl "https://{{Environments}}/v1/initiate" \ -H "Authorization: Bearer {accessToken}" -X POST \ -d '{ "clientId": "1234", "password": "5678", "pairingCode": "9101112" }'
答案 0 :(得分:1)
尝试在请求中添加-H "Content-Type: application/json"标头:
-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" }'
当我将上面的代码复制到邮递员时: