Variables in wget post data

后端 未结 2 1893
暗喜
暗喜 2020-12-29 21:26

I am working on a simple bash script to download images from the website Tumblr. The idea is to use read to get login info from the user, and wget --post-

相关标签:
2条回答
  • 2020-12-29 21:29

    important: Do not use :

    --header="Content-Type: text/xml" 
    

    together with --post-data. It will override

    --header="Content-Type: application/x-www-form-urlencoded" 
    

    issued by wget. Post-data will not be received by HttpServlet

    0 讨论(0)
  • 2020-12-29 21:40

    change:

    --post-data 'email=$EMAIL&password=$PASSWRD'
    

    to:

    --post-data="email=$EMAIL&password=$PASSWRD"
    

    bash manual about Quoting: http://www.gnu.org/software/bash/manual/bashref.html#Quoting

    0 讨论(0)
提交回复
热议问题