CURL踩坑记录

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

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

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

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

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

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

相关推荐
为java加瓦4 天前
Linux 系统磁盘空间清理指南:安全释放存储空间的完整方案
linux·curl
太空眼睛8 天前
【MCP】使用SpringBoot基于Streamable-HTTP构建MCP-Server
spring boot·sse·curl·mcp·mcp-server·spring-ai·streamable
风清扬_jd11 天前
libcurl 开启https一键编译指南【MT方式】
c++·https·curl
码农爱学习1 个月前
curl编程实例-上传文件
curl
龚建波1 个月前
记录:vcpkg清单模式安装指定版本的curl和OpenSSL
openssl·curl·vcpkg
YouEmbedded1 个月前
解码ARM 开发板 OpenSSL+cURL 交叉编译与 HTTPS 配置
https·openssl·curl
大米粥哥哥2 个月前
c++ libcurl报错Send failed since rewinding of the data stream failed【已解决】
开发语言·c++·http·curl·rewind
idolyXyz3 个月前
[curl-http3: 基于quiche+boringssl编译]
http3·curl·boringssl·quiche
叫我詹躲躲3 个月前
Linux 服务器磁盘满了?教你快速找到大文件,安全删掉不踩坑!
linux·前端·curl
叫我詹躲躲3 个月前
3 分钟搞定 Linux 磁盘清理:实用命令 + 自动脚本,新手也会
linux·curl