当前位置:网站首页>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 lineExecuting the above statement in Windows Terminal will always report an error
curl: no URL specified!curl: try 'curl --help' for more informationI 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 lineThis kind of problem is often encountered in the bat file, and you can eat a lot of money and become wiser~
边栏推荐
- Create virtual environments with virtualenv and Virtualenvwrapper virtual environment management tools
- Three, mysql storage engine - building database and table operation
- img 响应式图片的实现(含srcset属性、sizes属性的使用方法,设备像素比详解)
- 华为无线设备配置双链路冷备份(AP指定配置方式)
- cmd指令
- DRF generating serialization class code
- 数据库表设计规则
- 数据增强--学习笔记(图像类,cnn)
- Additional Features for Scripting
- Calculate the midpoint between two points
猜你喜欢
随机推荐
PHP算法之电话号码的字母组合
加载字体时避免隐藏文本
Thesis understanding [RL - Exp Replay] - Experience Replay with Likelihood-free Importance Weights
简单3D渲染器的制作
When solving yolov5 training: "AssertionError: train: No labels in VOCData/dataSet_path/train.cache. Can not train"
E - Integer Sequence Fair
Calculate the angle of a line defined by two points
SQL Server(设计数据库--存储过程--触发器)
联邦学习入门
SQL29 Calculate the average next day retention rate of users
访问控制台中的选定节点
PostgreSQL Basics--Common Commands
2022/7/31
PostgreSQL 基础--常用命令
数据增强--学习笔记(图像类,cnn)
测试岗月薪5-9k,如何实现涨薪到25k?
6134. 找到离给定两个节点最近的节点-力扣双百代码
Always use "noopener" or "noreferrer" for links that open in a new tab
B. Difference Array--Codeforces Round #808 (Div. 1)
软技能之UML图








