Skip to content

Commit 5c09fa1

Browse files
authored
[awscurl] Includes input data in output file (#2184)
1 parent aa473dc commit 5c09fa1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

awscurl/src/main/java/ai/djl/awscurl/HttpClient.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ public static HttpResponse sendRequest(
7777
long[] requestTime,
7878
String[] jq)
7979
throws IOException {
80-
ps.write(("\n" + System.currentTimeMillis() + ": ").getBytes(StandardCharsets.UTF_8));
80+
ps.write(
81+
("\ntimestamp: " + System.currentTimeMillis() + "\ninput: ")
82+
.getBytes(StandardCharsets.UTF_8));
83+
ps.write(request.getContent());
84+
ps.write(("\noutput: ").getBytes(StandardCharsets.UTF_8));
8185
long begin = System.nanoTime();
8286
try (CloseableHttpClient client = getHttpClient(insecure, timeout)) {
8387
HttpUriRequest req =

0 commit comments

Comments
 (0)