【问题标题】:How can I query some APIs request that has same field as this one?如何查询一些与此字段具有相同字段的 API 请求?
【发布时间】:2018-09-10 20:19:24
【问题描述】:

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”、“animals”的类似 API 请求, '人类', '移植' 字在里面?

我在 cy.route('Get or Post', (url request: something I need), 'fixture:file') 中使用它

【问题讨论】:

    标签: javascript api cypress


    【解决方案1】:

    要捕捉所有这些单词,允许它们之间提供数字,并允许在 transplant 之后添加任意数量的内容,这应该可以:

    cy.route("GET", "/api/*/animals/*/humans/*/transplant/**").as("getStuff")
    

    【讨论】:

      猜你喜欢
      • 2017-08-11
      • 1970-01-01
      • 2021-01-03
      • 2020-07-27
      • 1970-01-01
      • 2017-08-26
      • 1970-01-01
      • 2020-03-07
      • 1970-01-01
      相关资源
      最近更新 更多