HTTP response headers

HTTP response headers.

the response should (not )?have header “([^”]*)"

This step checks whether last HTTP(s) response has/doesn’t have given header. Argument have header "([^"]*)" is case sensitive.

Examples:

And the response should have header "Content-Length"
And the response should not have header "Content-Type"

the response should have header “([^”])" of value “([^”])"

This step checks whether last HTTP(s) response has given header of given value.

First argument header "([^"]*)" of should be name of header and is case-sensitive, second argument of value "([^"]*)" should be value of header, it may contain template values.

Examples:

And the response should have header "Content-Type" of value "{{.CONTENT_TYPE_JSON}}; charset=UTF-8"