Class ExchangeResult
java.lang.Object
org.springframework.test.web.servlet.client.ExchangeResult
- Direct Known Subclasses:
EntityExchangeResult
Container for request and response details for exchanges performed through
RestTestClient
.- Since:
- 7.0
- Author:
- Rob Worsnop, Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionvoid
assertWithDiagnostics
(Runnable assertion) Execute the given Runnable, catch anyAssertionError
, log details about the request and response at ERROR level under the class log category, and after that re-throw the error.Return the method of the request.Return the request headers sent to the server.Return response cookies received from the server.Return the response headers received from the server.Return the HTTP status code as anHttpStatusCode
value.Return the original URI template used to prepare the request, if any.getUrl()
Return the URI of the request.toString()
-
Method Details
-
getMethod
Return the method of the request. -
getUrl
Return the URI of the request. -
getUriTemplate
-
getRequestHeaders
Return the request headers sent to the server. -
getStatus
Return the HTTP status code as anHttpStatusCode
value. -
getResponseHeaders
Return the response headers received from the server. -
getResponseCookies
Return response cookies received from the server. -
assertWithDiagnostics
Execute the given Runnable, catch anyAssertionError
, log details about the request and response at ERROR level under the class log category, and after that re-throw the error. -
toString
-