我如何通过命令行界面运行这个curl命令 [英] How can i run this curl command via command line interface
问题描述
我尝试通过api界面将我的作品上传到deviantart
I am trying to upload my artworks to the deviantart via api interface
他们以下面的行为例
curl https://www.deviantart.com/api/v1/oauth2/stash/submit \
-F "title=My great stash item&artist_comments=This is a great image&keywords=test image" \
-F access_token=Alph4num3r1ct0k3nv4lu3 \
-F "test=@path/to/image.png"
我用自己的参数和安装的窗口修改了参数curl
I changed parameters with my own parameters and installed windows curl
想要如何使用curl
However i have 0 idea how to execute this multi-line command with curl
help
推荐答案
您可以将所有行放在一行中,或者用 ^ $替换行末尾的
\
c $ c>,批处理文件的延续字符
You can put all in one line, or, replace the \
character at the end of the lines with ^
, the continuation character for batch files
不知道你的参数,但是你应该记住 cmd
具有行长度限制:对于XP为2048,对于Vista和更高版本的OS为8192
Not sure about your parameters, but you should remember that cmd
has a line length limit: 2048 for XP, 8192 for Vista and later versions of the OS
另一个问题可能是字符。批处理文件中的
Another problem could be the characters.
字符需要进行转义,将它们替换为
%%
&),=
字符必须在用引号括起来的字符串中,转义为 ^&
,...
&),=
characters must be in a string enclosed in quotes or escaped as ^&
, ...
这篇关于我如何通过命令行界面运行这个curl命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!