最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

asp.net core - Specify expected response on .http files in Visual Studio 2022 - Stack Overflow

programmeradmin1浏览0评论

I have an .http file testing an endpoint for an scenario that returns a 400 after failing to validate the parameters (this is expected). But the test is failing because the response is not 2xx (I guess?).

How can I specify that 400 is the expected response for that test so it doesn’t fail?

### Get a 400 error when trying to get a client by names without the required parameters
GET {{host}}/clients/FindByName
Accept: application/json
apiKey: {{apiKey}}
Tenant: {{tenant}}

发布评论

评论列表(0)

  1. 暂无评论