Add ServerHttpResponse.addCookie method

This commit adds a `addCookie(ResponseCookie)` method to the reactive
`ServerHttpResponse` interface.

Issue: SPR-15523
This commit is contained in:
Arjen Poutsma
2017-05-09 10:18:39 +02:00
parent add1305252
commit b649041976
4 changed files with 28 additions and 3 deletions

View File

@@ -84,7 +84,7 @@ public class HttpHandlerConnectorTests {
TestHttpHandler handler = new TestHttpHandler(response -> {
response.setStatusCode(HttpStatus.OK);
response.getHeaders().put("custom-header", Arrays.asList("h0", "h1"));
response.getCookies().add(cookie.getName(), cookie);
response.addCookie(cookie);
return response.writeWith(Mono.just(toDataBuffer("Custom body")));
});