HeaderResultMatchers (Spring Framework 3.2.1.RELEASE API)
Date: 2013-01-24

org.springframework.test.web.servlet.result

## Class HeaderResultMatchers

- java.lang.Object
- - org.springframework.test.web.servlet.result.HeaderResultMatchers

-     public class HeaderResultMatchers
      extends Object

  Factory for response header assertions. An instance of this class is usually accessed via `MockMvcResultMatchers.header()`.
  Since:
    3.2
  Author:
    Rossen Stoyanchev

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `HeaderResultMatchers()` Protected constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ResultMatcher` | `longValue(String name, long value)` Assert the primary value of a response header as a `Long`.
    `ResultMatcher` | `string(String name, org.hamcrest.Matcher<? super String> matcher)` Assert a response header with the given Hamcrest `Matcher`.
    `ResultMatcher` | `string(String name, String value)` Assert the primary value of a response header as a `String`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HeaderResultMatchers

          protected HeaderResultMatchers()

      Protected constructor. Use `MockMvcResultMatchers.header()`.

  - ### Method Detail

    - #### string

          public ResultMatcher string(String name,
                             org.hamcrest.Matcher<? super String> matcher)

      Assert a response header with the given Hamcrest `Matcher`.

    - #### string

          public ResultMatcher string(String name,
                             String value)

      Assert the primary value of a response header as a `String`.

    - #### longValue

          public ResultMatcher longValue(String name,
                                long value)

      Assert the primary value of a response header as a `Long`.