Merge branch '5.1.x'
# Conflicts: # build.gradle # spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java # spring-aspects/spring-aspects.gradle # spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java # spring-beans/src/main/java/org/springframework/beans/factory/support/GenericBeanDefinition.java # spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java # spring-orm/spring-orm.gradle # spring-test/spring-test.gradle
This commit is contained in:
@@ -155,7 +155,7 @@ public class ExchangeResult {
|
||||
|
||||
|
||||
/**
|
||||
* Return the status of the executed request.
|
||||
* Return the HTTP status code as an {@link HttpStatus} enum value.
|
||||
*/
|
||||
public HttpStatus getStatus() {
|
||||
return this.response.getStatusCode();
|
||||
@@ -219,16 +219,12 @@ public class ExchangeResult {
|
||||
"\n" +
|
||||
formatBody(getRequestHeaders().getContentType(), this.requestBody) + "\n" +
|
||||
"\n" +
|
||||
"< " + getStatus() + " " + getStatusReason() + "\n" +
|
||||
"< " + getStatus() + " " + getStatus().getReasonPhrase() + "\n" +
|
||||
"< " + formatHeaders(getResponseHeaders(), "\n< ") + "\n" +
|
||||
"\n" +
|
||||
formatBody(getResponseHeaders().getContentType(), this.responseBody) +"\n";
|
||||
}
|
||||
|
||||
private String getStatusReason() {
|
||||
return getStatus().getReasonPhrase();
|
||||
}
|
||||
|
||||
private String formatHeaders(HttpHeaders headers, String delimiter) {
|
||||
return headers.entrySet().stream()
|
||||
.map(entry -> entry.getKey() + ": " + entry.getValue())
|
||||
|
||||
Reference in New Issue
Block a user