知识卡片
观测既有API行为
用请求样本起草既有接口时,分别记录方法、完整 URL、请求输入、状态码、头部及响应体。FarmStall 先用 GET 加评分上限,观察响应是否为评价数组。之后应补试边界和失败场景,单次成功只能证明这组输入的观察结果。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Getting set up to make API requests 2.4 Our first request · 查看原书依据
If you haven’t done so already, start up Postman. Figure 2.2 shows the key areas in the main page that we are interested in for our GET request:
参考来源
- 位置:《Designing APIs with Swagger and OpenAPI》第02章《Getting set up to make API requests》(来源项目 book-source:extracted/Designing APIs with Swagger and OpenAPI/_epub-src/OEBPS/Text/ch02.htm,阅读块 53)
- 结论依据:示例在 HTTP 客户端中选择方法、地址并发送请求,观察实际响应。
- 原始内容:If you haven’t done so already, start up Postman. Figure 2.2 shows the key areas in the main page that we are interested in for our GET request: