admin管理员组

文章数量:1309930

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}}

本文标签: aspnet coreSpecify expected response on http files in Visual Studio 2022Stack Overflow