How do I POST form data with UTF-8 encoding by using curl?

后端 未结 1 1833
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-30 02:28

I would like to POST (send) some form data to a webserver using cURL on a terminal-prompt.

This is what I got so far:

curl          


        
相关标签:
1条回答
  • 2020-12-30 02:52

    You CAN use UTF-8 in the POST request, all you need is to specify the charset in your request.

    You should use this request:

    curl -X POST -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" --data-ascii "content=derinhält&date=asdf" http://myserverurl.com/api/v1/somemethod
    
    0 讨论(0)
提交回复
热议问题