javascript - 如何查询一些与此字段具有相同字段的 API 请求?
问题描述
API请求示例:https : //www.sbsb.com/api/v250/animals/123456789/humans/987654321 /transplant?$skip=0&$top=666&$orderby=animalAssociatedHumans/sortDate
有没有像 api/ /animals/ /humans/*/transplant?....../sortDate 这样的东西,它会捕获所有类似的 API 请求,其中包含“api”、“animals”、“humans”、“transplant”等词它 ?
我在 cy.route('Get or Post', (url request: something I need), 'fixture:file') 中使用它
解决方案
要捕获所有这些单词,请允许它们之间提供的数字,并在transplant
这之后允许任何数量的东西应该起作用:
cy.route("GET", "/api/*/animals/*/humans/*/transplant/**").as("getStuff")
推荐阅读
- php - 使用 Guzzle 发送请求后无法接收响应
- python - 如何在主模块中连接输入和功能模块,我们可以从函数中返回列表吗?
- java - 如何创建 Cassandra ITrigger 析构函数?
- python - django 内置身份验证器不起作用
- svg - swiftui 在您的项目中使用非 SF Symbols SVG
- python - Could not find a version that satisfies the requirement **tusclient**
- java - 解密失败 使用填充密码解密时,输入长度必须是 16 的倍数
- django - 在 Django Admin 中,我可以根据外键布局对象列表(在相应标题下创建标题和分组对象)吗?
- hive - 在 hive 查询中将 python 列表作为参数传递
- php - Laravel 6.x - hasMany,belongsTo,什么时候执行这些的数据库查询?