Headers
Bard allows you to assert that the correct headers are present in your API Response.
1
[Fact]
2
public void Should_included_content_type_header_with_correct_value()
3
{
4
When.Get(URL);
5
​
6
Then
7
.Response
8
.Headers
9
.ShouldInclude("Content-Type", "application/json; charset=utf-8");
10
11
}
Copied!
Last modified 1yr ago
Export as PDF
Copy link