我正在使用CURL集成到xBase程序中的内容。
curl命令行包括了将本地文件下载到-T日历的选项CalDAV。我试图在HTTPIE中找到它,但没有找到一个等价的命令。HTTPIE有像-T这样的卷曲选项吗?
发布于 2022-03-01 12:27:45
从卷曲手册:
-T, --upload-file <file>
This transfers the specified local file to the remote URL.似乎你是在寻找上传功能。在HTTPie中,取决于主机服务器所期望的内容,您有多种方式上传文件:
( A) 重定向输入
$ http PUT httpbin.org/put Content-Type:image/png < /images/photo.png( B) 从文件名请求数据 (自动设置Content-Type头):
$ http PUT httpbin.org/put @/images/photo.png( C) 表单文件上传
$ http --form PUT httpbin.org/put photo=@/images/photo.png雅库布·罗兹托西的原始答案。
https://stackoverflow.com/questions/70673896
复制相似问题