rest-assured - 我得到了 405 的放心获取请求,但它在邮递员上工作正常
解决方案
你做错了我的朋友。这就是理想的 Rest-Assured 的使用方式。
Response response = RestAssured.given ()
.baseUri ("<endPoint>") // The hidden part of the sample you shared.
.basePath ("/rest/onboarding/profile")
.contentType (ContentType.JSON)
.queryParam ("user_id", 11)
.when ()
.get ("/load_user_profile");
System.out.println (response.statusCode ());
System.out.println (response.statusLine ());
试试这个示例,让我知道这是否对您有用,是否对我有用。
推荐阅读
- mongodb - 如何将 Bson ObjectId 添加到 JObject
- firebase - Firestore 规则:如何允许基于父属性读取嵌套文档
- android - Android手势在活动中不起作用
- javascript - 解决将变量更改为特定值的承诺
- python - 派斯帕克。如何创建 df.shema 那样的?
- javascript - 转义但仍然“未捕获的语法错误:无效的正则表达式:正则表达式:未终止的组”
- reactjs - 如何将两个对象合并为一个 - React-Native 状态
- javascript - 在“Promise.then()”中返回一个带有“then”函数的对象
- javascript - 如何水平对齐两个 React 组件?
- routing - Yii2 showScriptName 给我 404s