DefaultHttpRequest extends DefaultStreamMessage<HttpObject> implements HttpRequestWriter { @Override public final RequestHeaders headers() { return headers; } DefaultHttpRequest(RequestHeaders headers); @Override final RequestHeaders headers(); @Override String toString();  }
@Test void ignoresAfterTrailersIsWritten() { final HttpRequestWriter req = HttpRequest.streaming(HttpMethod.GET, "/foo"); req.write(HttpData.ofUtf8("foo")); req.write(HttpHeaders.of(HttpHeaderNames.of("a"), "b")); req.write(HttpHeaders.of(HttpHeaderNames.of("c"), "d")); req.close(); final AggregatedHttpRequest aggregated = req.aggregate().join(); assertThat(aggregated.headers()).isEqualTo( RequestHeaders.of(HttpMethod.GET, "/foo", HttpHeaderNames.CONTENT_LENGTH, "3")); assertThat(aggregated.contentUtf8()).isEqualTo("foo"); assertThat(aggregated.trailers()).isEqualTo(HttpHeaders.of(HttpHeaderNames.of("a"), "b")); }