in core/java8/proxy/src/main/java/org/apache/openwhisk/runtime/java/action/Proxy.java [61:67]
private static void writeResponse(HttpExchange t, int code, String content) throws IOException {
byte[] bytes = content.getBytes(StandardCharsets.UTF_8);
t.sendResponseHeaders(code, bytes.length);
OutputStream os = t.getResponseBody();
os.write(bytes);
os.close();
}