@Test public void shouldApplyHeaders() { response.getHeaders().put("key1", Arrays.asList("value1", "value2")); response.getHeaders().add("key2", "value3"); response.applyHeaders(); verify(mockHttpServerResponse).putHeader("key1", (Iterable<String>) Arrays.asList("value1", "value2")); verify(mockHttpServerResponse).putHeader("key2", (Iterable<String>) Collections.singletonList("value3")); }
@Override protected void applyHeaders() { HttpHeaders headers = getHeaders(); if (!headers.containsKey(HttpHeaders.CONTENT_LENGTH)) { logger.debug("Setting chunked response"); delegate.setChunked(true); } headers.forEach(delegate::putHeader); }
VertxServerHttpResponse extends AbstractServerHttpResponse implements ZeroCopyHttpOutputMessage { @Override protected void applyHeaders() { HttpHeaders headers = getHeaders(); if (!headers.containsKey(HttpHeaders.CONTENT_LENGTH)) { logger.debug("Setting chunked response"); delegate.setChunked(true); } headers.forEach(delegate::putHeader); } }
VertxServerHttpResponse extends AbstractServerHttpResponse implements ZeroCopyHttpOutputMessage { @Override protected void applyHeaders() { HttpHeaders headers = getHeaders(); if (!headers.containsKey(HttpHeaders.CONTENT_LENGTH)) { logger.debug("Setting chunked response"); delegate.setChunked(true); } headers.forEach(delegate::putHeader); } VertxServerHttpResponse(RoutingContext context, BufferConverter bufferConverter); }
VertxServerHttpResponse extends AbstractServerHttpResponse implements ZeroCopyHttpOutputMessage { @Override protected void applyHeaders() { HttpHeaders headers = getHeaders(); if (!headers.containsKey(HttpHeaders.CONTENT_LENGTH)) { logger.debug("Setting chunked response"); delegate.setChunked(true); } headers.forEach(delegate::putHeader); } VertxServerHttpResponse(RoutingContext context, BufferConverter bufferConverter); @SuppressWarnings("unchecked") @Override T getNativeResponse(); @Override Mono<Void> writeWith(Path file, long position, long count); }
VertxServerHttpResponse extends AbstractServerHttpResponse implements ZeroCopyHttpOutputMessage { @Override protected void applyHeaders() { HttpHeaders headers = getHeaders(); if (!headers.containsKey(HttpHeaders.CONTENT_LENGTH)) { logger.debug("Setting chunked response"); delegate.setChunked(true); } headers.forEach(delegate::putHeader); } VertxServerHttpResponse(RoutingContext context, BufferConverter bufferConverter); @SuppressWarnings("unchecked") @Override T getNativeResponse(); @Override Mono<Void> writeWith(Path file, long position, long count);  }