@Test public void shouldApplyHeaders() { request.getHeaders().put("key1", Arrays.asList("value1", "value2")); request.getHeaders().add("key2", "value3"); request.applyHeaders(); verify(mockHttpClientRequest).putHeader("key1", (Iterable<String>) Arrays.asList("value1", "value2")); verify(mockHttpClientRequest).putHeader("key2", (Iterable<String>) Collections.singletonList("value3")); }
@Override protected void applyHeaders() { HttpHeaders headers = getHeaders(); if (!headers.containsKey(HttpHeaders.CONTENT_LENGTH)) { logger.debug("Setting chunked request"); delegate.setChunked(true); } headers.forEach(delegate::putHeader); }
VertxClientHttpRequest extends AbstractClientHttpRequest { @Override protected void applyHeaders() { HttpHeaders headers = getHeaders(); if (!headers.containsKey(HttpHeaders.CONTENT_LENGTH)) { logger.debug("Setting chunked request"); delegate.setChunked(true); } headers.forEach(delegate::putHeader); } }
VertxClientHttpRequest extends AbstractClientHttpRequest { @Override protected void applyHeaders() { HttpHeaders headers = getHeaders(); if (!headers.containsKey(HttpHeaders.CONTENT_LENGTH)) { logger.debug("Setting chunked request"); delegate.setChunked(true); } headers.forEach(delegate::putHeader); } VertxClientHttpRequest(HttpClientRequest delegate, BufferConverter bufferConverter); }
VertxClientHttpRequest extends AbstractClientHttpRequest { @Override protected void applyHeaders() { HttpHeaders headers = getHeaders(); if (!headers.containsKey(HttpHeaders.CONTENT_LENGTH)) { logger.debug("Setting chunked request"); delegate.setChunked(true); } headers.forEach(delegate::putHeader); } VertxClientHttpRequest(HttpClientRequest delegate, BufferConverter bufferConverter); @Override HttpMethod getMethod(); @Override URI getURI(); @Override DataBufferFactory bufferFactory(); @Override Mono<Void> writeWith(Publisher<? extends DataBuffer> chunks); @Override Mono<Void> writeAndFlushWith(Publisher<? extends Publisher<? extends DataBuffer>> chunks); @Override Mono<Void> setComplete(); }
VertxClientHttpRequest extends AbstractClientHttpRequest { @Override protected void applyHeaders() { HttpHeaders headers = getHeaders(); if (!headers.containsKey(HttpHeaders.CONTENT_LENGTH)) { logger.debug("Setting chunked request"); delegate.setChunked(true); } headers.forEach(delegate::putHeader); } VertxClientHttpRequest(HttpClientRequest delegate, BufferConverter bufferConverter); @Override HttpMethod getMethod(); @Override URI getURI(); @Override DataBufferFactory bufferFactory(); @Override Mono<Void> writeWith(Publisher<? extends DataBuffer> chunks); @Override Mono<Void> writeAndFlushWith(Publisher<? extends Publisher<? extends DataBuffer>> chunks); @Override Mono<Void> setComplete();  }