open class HeaderResultMatchers
Factory for response header assertions.
An instance of this class is available via MockMvcResultMatchers#header.
Author
Rossen Stoyanchev
Author
Sam Brannen
Author
Brian Clozel
Since
3.2
open fun dateValue(name: String, value: Long): ResultMatcher
Assert the primary value of the named response header as a date String, using the preferred date format described in RFC 7231. The ResultMatcher returned by this method throws an AssertionError if the response does not contain the specified header, or if the supplied |
|
open fun doesNotExist(name: String): ResultMatcher
Assert that the named response header does not exist. |
|
open fun longValue(name: String, value: Long): ResultMatcher
Assert the primary value of the named response header as a The ResultMatcher returned by this method throws an AssertionError if the response does not contain the specified header, or if the supplied |
|
open fun string(name: String, matcher: Matcher<in String>): ResultMatcher
Assert the primary value of the response header with the given Hamcrest String open fun string(name: String, value: String): ResultMatcher
Assert the primary value of the response header as a String value. |
|
open fun <T : Any> stringValues(name: String, matcher: Matcher<MutableIterable<String>>): ResultMatcher
Assert the values of the response header with the given Hamcrest Iterable Matcher. open fun stringValues(name: String, vararg values: String): ResultMatcher
Assert the values of the response header as String values. |