как передать один ответ команды curl на другой запрос curl - PullRequest
0 голосов
/ 04 мая 2019

У меня есть 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
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...