@CsvSource({ "true", "false" })
    @ParameterizedTest
    void streamingRequest(boolean send100Continue) throws Exception {
        try (ServerSocket ss = new ServerSocket(0)) {
            final int port = ss.getLocalPort();
            final WebClient client = WebClient.of("h1c://127.0.0.1:" + port);
            final RequestHeaders headers =
                    RequestHeaders.builder(HttpMethod.POST, "/")
                                  .contentType(MediaType.PLAIN_TEXT_UTF_8)
                                  .add(HttpHeaderNames.EXPECT, HttpHeaderValues.CONTINUE.toString())
                                  .build();
            final HttpRequestWriter req = HttpRequest.streaming(headers);

            final CompletableFuture<AggregatedHttpResponse> future = client.execute(req).aggregate();

            req.write(HttpData.ofUtf8("foo"));
            req.close();

            try (Socket s = ss.accept()) {
                final InputStream inputStream = s.getInputStream();
                final BufferedReader in = new BufferedReader(
                        new InputStreamReader(inputStream, StandardCharsets.US_ASCII));
                final OutputStream out = s.getOutputStream();

                assertThat(in.readLine()).isEqualTo("POST / HTTP/1.1");
                assertThat(in.readLine()).startsWith("host: 127.0.0.1:");
                assertThat(in.readLine()).isEqualTo("content-type: text/plain; charset=utf-8");
                assertThat(in.readLine()).isEqualTo("expect: 100-continue");
                assertThat(in.readLine()).startsWith("user-agent: armeria/");
                assertThat(in.readLine()).isEqualTo("transfer-encoding: chunked");
                assertThat(in.readLine()).isEmpty();

                if (send100Continue) {
                    out.write("HTTP/1.1 100 Continue\r\n\r\n".getBytes(StandardCharsets.US_ASCII));

                    assertThat(in.readLine()).isEqualTo("3");
                    assertThat(in.readLine()).isEqualTo("foo");
                }
                out.write(("HTTP/1.1 201 Created\r\n" +
                           "Connection: close\r\n" +
                           "Content-Length: 0\r\n" +
                           "\r\n").getBytes(StandardCharsets.US_ASCII));
                final AggregatedHttpResponse res = future.join();
                assertThat(res.status()).isEqualTo(HttpStatus.CREATED);
                if (!send100Continue) {
                    // request body wasn't sent so cancelled.
                    assertThatThrownBy(() -> req.whenComplete().join()).hasCauseInstanceOf(
                            CancelledSubscriptionException.class);
                }
            }
        }
    }
This test is to check the behavior of the HttpClient when the 'Expect: 100-continue' header is set.
core/src/test/java/com/linecorp/armeria/client/HttpClientExpect100HeaderTest.java