curlconverter / curlconverter

Transpile curl commands into Python, JavaScript and 27 other languages
https://curlconverter.com
MIT License
7.17k stars 867 forks source link

command should begin with "curl" but instead begins with "-H" #585

Closed LUK-jiao closed 9 months ago

LUK-jiao commented 9 months ago

I copied a curl from a translate website and paste it to curlconverter trying to generate some go language, then the error happened as the title. And the curl is below, can anyone help me with this issue? Thanks from the bottom of my heart! Below is my curl: curl "https://api.interpreter.caiyunai.com/v1/dict" ^ -H "authority: api.interpreter.caiyunai.com" ^ -H "accept: application/json, text/plain, /" ^ -H "accept-language: zh-CN,zh;q=0.9" ^ -H "app-name: xy" ^ -H "content-type: application/json;charset=UTF-8" ^ -H "device-id: 8f28bb28d05044ce6ffe2b1497c425df" ^ -H "origin: https://fanyi.caiyunapp.com" ^ -H "os-type: web" ^ -H "os-version;" ^ -H "referer: https://fanyi.caiyunapp.com/" ^ -H "sec-ch-ua: ^\^"Google Chrome^\^";v=^\^"113^\^", ^\^"Chromium^\^";v=^\^"113^\^", ^\^"Not-A.Brand^\^";v=^\^"24^\^"" ^ -H "sec-ch-ua-mobile: ?0" ^ -H "sec-ch-ua-platform: ^\^"Windows^\^"" ^ -H "sec-fetch-dest: empty" ^ -H "sec-fetch-mode: cors" ^ -H "sec-fetch-site: cross-site" ^ -H "user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36" ^ -H "x-authorization: token:qgemv4jr1y38jyq6vhvi" ^ --data-raw "^{^\^"trans_type^\^":^\^"en2zh^\^",^\^"source^\^":^\^"good^\^"^}" ^ --compressed

verhovsky commented 9 months ago

You clicked "copy as curl (cmd)" instead of "copy as curl (bash)"

LUK-jiao commented 9 months ago

Oh, thank you sincerely!