On Tue, 14 Oct 2025 13:33:45 GMT, Josiah Noel <[email protected]> wrote:
> work the same as an extended GET request.
In fact, this might be a good way of thinking about it. When you call
`sendResponseHeaders(200, 0)` a similar thing happens to what I'm asking for
101. The streams are not closed, and the handler is free to read the
inputstream and write to the outputstream as it pleases.
server.createContext(
"/test",
exchange -> {
exchange.sendResponseHeaders(200, 0);
exchange.getResponseBody().write("My Response".getBytes());
try (var is = exchange.getRequestBody()) {
is.transferTo(exchange.getResponseBody());
}
});
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27751#issuecomment-3401986420