如何将一个curl命令响应传递给其他curl请求

时间:2019-05-03 21:12:50

标签: curl

我有命令URL

curl -H "Content-Type: application/json" \-d '{"pin" : "test"}'https://localhost:8080/mobile/cors/1.0/
 and SID comes in response, that SID I want to pass on another curl, 

curl  -H "Content-Type: application/json" \-d '{"SID":"${sid}"}' https://localhost:8080/user

我尝试使用以下命令,但没有运气

curl -H "Content-Type: application/json" \-d '{"pin" : "test"}'https://localhost:8080/mobile/cors/1.0/ | jq --raw-output '.SID' && echo $SID && curl  -H "Content-Type: application/json" \-d '{"SID":"${SID}"}' https://localhost:8080/user

0 个答案:

没有答案