This step definition is used to check the value of an HTTP response header. It makes sure the server response includes the expected header and that its value matches or contains what you specify.
Then (?:the response header|the header) "([^"]*)" should (?:be|contain) "([^"]*)"$
Example #1: Then the response header "Content-Type" should be "application/json"
Example #2: Then the header "Cache-Control" should contain "no-cache"