Skip to content

Commit 4d0d4fb

Browse files
Update multipart proposal to fix a mistake in the buffered model. (#250)
This highlights the inconsistency with sync/async in the buffered model.
1 parent 5d9c537 commit 4d0d4fb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

docs-internal/multipart.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ The following example consumes each part content as a `JsonObject`:
4949
```java
5050
request.content().as(MultiPart.class).thenAccept(mp -> {
5151
for(BodyPart bodyPart : mp.bodyParts()){
52-
JsonObject json = bodyPart.content().as(JsonObject.class);
5352
System.out.println("File uploaded: " + bodyPart.headers().filename());
54-
System.out.println(json.toString());
53+
bodyPart.content().as(JsonObject.class).thenAccept((json) -> {
54+
System.out.println(json.toString());
55+
});
5556
}
5657
response.send("Files uploaded successful");
5758
});

0 commit comments

Comments
 (0)