curl post使用shell变量

  sre

5fcb4bd12f8159144.jpg_fo742.jpg
PHONE是变量

curl 'http:/127.0.0.1:5555/user/register' \
  -H 'sec-ch-ua: "Google Chrome";v="89", "Chromium";v="89", ";Not A Brand";v="99"' \
  -H 'accept: application/json' \
  -H 'dnt: 1' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36' \
  -H 'content-type: application/json;charset=UTF-8' \
  -H 'sec-fetch-site: same-origin' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-dest: empty' \
  -H 'accept-language: zh,zh-CN;q=0.9' \
  --data '{"phoneNumber":"'"$PHONE"'","code":"aa123456"}' \
  --compressed

LEAVE A COMMENT

Captcha Code