Expect that response headers matches the supplied headers and values.
E.g. expect that the response of the GET request to "/something" contains header Pragma=no-cache
and Content-Encoding=gzip:
expect().headers("Pragma", "no-cache", "Content-Encoding", "gzip").when().get("/something");
You can also use Hamcrest matchers:
expect().response().headers("Content-Type", containsString("application/json"), "Pragma", equalsTo("no-cache")).when().get("/something");
and you can even mix string matching and hamcrest matching:
expect().headers("Content-Type", containsString("application/json"), "Pragma", "no-cache").when().get("/something");