Add rawStatusCode() to ServerResponse in both WebFlux and Servlet

Closes gh-22872
This commit is contained in:
Arjen Poutsma
2019-07-19 15:53:15 +02:00
parent 56c2987273
commit 7b73418418
9 changed files with 47 additions and 2 deletions

View File

@@ -81,6 +81,7 @@ public class DefaultEntityResponseBuilderTests {
EntityResponse.fromObject(body).status(HttpStatus.CREATED).build();
assertThat(result.statusCode()).isEqualTo(HttpStatus.CREATED);
assertThat(result.rawStatusCode()).isEqualTo(201);
}
@Test

View File

@@ -67,6 +67,7 @@ public class DefaultServerResponseBuilderTests {
public void status() {
ServerResponse response = ServerResponse.status(HttpStatus.CREATED).build();
assertThat(response.statusCode()).isEqualTo(HttpStatus.CREATED);
assertThat(response.rawStatusCode()).isEqualTo(201);
}
@Test