shell post json格式问题

  sre
#!/bin/bash
post_url='https://test.com/post_json'
post_ip='sdsdsd'
post_mac='sdsddcxvxcvcvcv'
post_user='root'
PASSWORD='dssdsdsd'
#用单引号
curl -i -X POST -H "'Content-type':'application/json'" -d '{"post_ip":"'post_ip'","post_mac":"'post_mac'","post_user":"'post_user'","PASSWORD":"'PASSWORD'"}' $post_url

LEAVE A COMMENT

Captcha Code