Special characters like @ and & in cURL POST data

前端 未结 6 1253
旧时难觅i
旧时难觅i 2020-12-07 18:52

How do I include special characters like @ and & in the cURL POST data? I\'m trying to pass a name and password like:

curl -d name=john passwd=@31&3*         


        
6条回答
  •  粉色の甜心
    2020-12-07 19:21

    How about using the entity codes...

    @ = %40

    & = %26

    So, you would have:

    curl -d 'name=john&passwd=%4031%263*J' https://www.mysite.com

提交回复
热议问题