Skip to content

Commit 436b474

Browse files
committed
Properly emit multipart/form-data in post endpoint
Fixes #9.
1 parent 080493a commit 436b474

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/gaul/httpbin/HttpBinHandler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,9 @@ baos, new Deflater(Deflater.DEFAULT_COMPRESSION,
371371
data.put(part.getName(), new String(baos.toByteArray(),
372372
StandardCharsets.UTF_8));
373373
}
374-
response.put("data", data);
374+
response.put("data", "");
375+
response.put("form", data);
376+
response.put("json", JSONObject.NULL);
375377
} else {
376378
ByteArrayOutputStream baos = new ByteArrayOutputStream();
377379
Utils.copy(is, baos);

0 commit comments

Comments
 (0)