java - 如何放心发送-d信息?
问题描述
我正在尝试自动化一个需要发送 -d 信息的 api。
curl请求看起来像这样-
curl -X PUT "https://XXXXXXX.com/v1/YOLO/cccc/abc/mom" -H "accept: */*" -H "Content-Type: application/json" -d "[10035]"
我无法-d "[10035]"
在请求中发送这部分。
需要放心,这就是我正在尝试的-
RequestSpecification request = given().filter(new RequestLoggingFilter(requestCapture));
Response response = request.auth().basic(XXX,XXX).body(Arrays.asList("10017")).contentType("application/json")
.put(Chttps://XXXXXXX.com/v1/YOLO/cccc/abc/mom").then().extract()
.response();
我感谢您的帮助。
解决方案
Try to use
curl --data-raw "[10035]" https://example.com
推荐阅读
- javascript - mocha如何执行目录下的测试文件?
- c - 处理多个 TCP 客户端
- javascript - Jquery 到 Vanilla Javascript 获取属性数据
- javascript - 如何在角度应用程序的文本区域中显示超链接
- javascript - 为什么继承的类比 pixi.js 上的实际精灵对象慢?
- android - 从 android 活动类创建反应原生模块
- raspberry-pi - Rook-Ceph 部署:创建 csi-cephfsplugin-provisioner 和 csi-rdb-plugin-provisioner 时出错
- c - 如何使用 inotify 实例同时监控两条路径?
- java - 我可以在安装应用程序时做些什么吗?
- mysql - 如果第二个表匹配条件,我如何查询 2 个表并返回结果