Support for non-standard HTTP status in reactive ClientHttpResponse
Issue: SPR-16748
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -40,6 +40,7 @@ import org.springframework.util.MultiValueMap;
|
||||
|
||||
/**
|
||||
* Mock implementation of {@link ClientHttpResponse}.
|
||||
*
|
||||
* @author Brian Clozel
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.0
|
||||
@@ -68,6 +69,11 @@ public class MockClientHttpResponse implements ClientHttpResponse {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRawStatusCode() {
|
||||
return this.status.value();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpHeaders getHeaders() {
|
||||
String headerName = HttpHeaders.SET_COOKIE;
|
||||
@@ -138,4 +144,4 @@ public class MockClientHttpResponse implements ClientHttpResponse {
|
||||
return (charset != null ? charset : StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user