当前位置:网站首页>Special characters & escapes in bat
Special characters & escapes in bat
2022-08-01 23:10:00 【Purple fire mulberry】
Look at the example first
curl -H "Content-Type:application/json"-X POST-d "{\"value\":\"type=username&username=xxxx0001\"}"http://127.0.0.1:8111/loginbyother//The above command is to wrap the line for the convenience of reading the code, it is actually a whole line
Executing the above statement in Windows Terminal will always report an error
curl: no URL specified!curl: try 'curl --help' for more information
I always thought it was a problem with quotation marks, so I used various methods to escape the quotation marks, and even used UrlEncode, but it didn't work. Finally, it was determined that it was the problem of the ampersand, because in windows, & means a commandconcatenation, so it must be escaped.
& escape ====> ^&
Then modify the code as follows
curl -H "Content-Type:application/json"-X POST-d "{\"value\":\"type=username^&username=xxxx0001\"}"http://127.0.0.1:8111/loginbyother//The above command is to wrap the line for the convenience of reading the code, it is actually a whole line
This kind of problem is often encountered in the bat file, and you can eat a lot of money and become wiser~
边栏推荐
猜你喜欢
【SeaTunnel】从一个数据集成组件演化成企业级的服务
Quarantine and downgrade
System availability: 3 9s, 4 9s in SRE's mouth... What is it?
E - Integer Sequence Fair
论文理解【RL - Exp Replay】—— Experience Replay with Likelihood-free Importance Weights
03. GO language variable definition, function
Wechat Gymnasium Reservation Mini Program Graduation Design Finished Work Mini Program Graduation Design Finished Product (2) Mini Program Function
C#大型互联网平台管理框架源码:基于ASP.NET MVC+EF6+Bootstrap开发,支持多数据库
What is CICD excuse me
CAKE:一个用于多视图知识图谱补全的可扩展性常识感知框架
随机推荐
选择合适的 DevOps 工具,从理解 DevOps 开始
Access the selected node in the console
Chapter 19 Tips and Traps: Common Goofs for Novices
How to use pywinauto and pyautogui to link the anime lady and sister please go home
Wechat Gymnasium Reservation Mini Program Graduation Design Finished Work Mini Program Graduation Design Finished Product (2) Mini Program Function
y84.第四章 Prometheus大厂监控体系及实战 -- prometheus告警机制进阶(十五)
别看了,这就是你的题呀
SRv6 L3VPN的工作原理
【好书推荐】第一本无人驾驶技术书
复现gallerycms字符长度限制短域名绕过
Is TCP reliable?Why?
IDEA common plugins
基于JAX的激活函数、softmax函数和交叉熵函数
如何使用pywinauto和pyautogui将动漫小姐姐链接请回家
计算两点之间的距离
CF1705D Mark and Lightbulbs
加载字体时避免隐藏文本
excel edit a cell without double clicking
chrome copies the base64 data of an image
计算两点之间的中点