CURL踩坑记录

因为项目使用的windows server,且没有安装Postman,所以对于在本地的Postman上执行的请求,要拷贝到服务器执行,只能先转化成为curl命令,操作也很简单,如下:

注意,Postman默认对url包围的是单引号,而不是双引号,这点很坑

然后将其拷贝到命令行下执行,但是会报错

这是因为Window服务器上执行url时,使用单引号,原因问过ChatGPT了

给的说法就是Windows更适合使用双引号来解析特殊字符,如空格,&等

如果希望Postman给出的curl每次都是双引号,可以设置成double quote

相关推荐
龚建波3 天前
记录:vcpkg清单模式安装指定版本的curl和OpenSSL
openssl·curl·vcpkg
YouEmbedded4 天前
解码ARM 开发板 OpenSSL+cURL 交叉编译与 HTTPS 配置
https·openssl·curl
大米粥哥哥1 个月前
c++ libcurl报错Send failed since rewinding of the data stream failed【已解决】
开发语言·c++·http·curl·rewind
idolyXyz1 个月前
[curl-http3: 基于quiche+boringssl编译]
http3·curl·boringssl·quiche
叫我詹躲躲2 个月前
Linux 服务器磁盘满了?教你快速找到大文件,安全删掉不踩坑!
linux·前端·curl
叫我詹躲躲2 个月前
3 分钟搞定 Linux 磁盘清理:实用命令 + 自动脚本,新手也会
linux·curl
大米粥哥哥3 个月前
Qt libcurl的下载、配置及简单测试 (windows环境)
开发语言·c++·windows·qt·http·curl·libcurl
xchenhao3 个月前
Elasticsearch 常用任务管理命令及实战应用
elasticsearch·webhook·curl·查询·任务·告警·bot
xiaok3 个月前
使用curl在Linux中测试HTTP请求
curl
Ray Song3 个月前
【Linux】 wget、curl 用法区别
linux·运维·服务器·curl·wget