Interface RequestMatcher

All Known Subinterfaces:
RequestExpectation
All Known Implementing Classes:
DefaultRequestExpectation
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface RequestMatcher
A contract for matching requests to expectations.

See MockRestRequestMatchers for static factory methods.

Since:
3.2
Author:
Craig Walls
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    match(org.springframework.http.client.ClientHttpRequest request)
    Match the given request against specific expectations.
  • Method Details

    • match

      void match(org.springframework.http.client.ClientHttpRequest request) throws IOException, AssertionError
      Match the given request against specific expectations.
      Parameters:
      request - the request to make assertions on
      Throws:
      IOException - in case of I/O errors
      AssertionError - if expectations are not met