🃏
Bard
  • Introduction
  • Getting Started
    • Installation
    • Writing Your First Test
    • Configuration
    • .NET Fiddles
  • Anatomy Of A Scenario
    • Given
      • StoryData
      • StoryBook
      • Chapter
      • Story
    • When
    • Then
      • HTTP Response
      • Headers
      • Bad Requests
      • Performance Testing
  • Advanced
    • Dependency Injection
  • Miscellaneous
    • Change Log
    • Migration Guide
  • gRPC
    • Installation
    • Configuration
    • Writing A Test
  • Tips & Tricks
    • FAQ
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Anatomy Of A Scenario
  2. Then

Headers

Bard allows you to assert that the correct headers are present in your API Response.

[Fact]
public void Should_included_content_type_header_with_correct_value()
{
   When.Get(URL);

   Then
       .Response
       .Headers
       .ShouldInclude("Content-Type", "application/json; charset=utf-8");
           
}
PreviousHTTP ResponseNextBad Requests

Last updated 4 years ago

Was this helpful?