Skip to content

Commit

Permalink
Changes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
FroMage committed Aug 26, 2022
1 parent 7a1d206 commit 44db973
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions docs/src/main/asciidoc/rest-client-reactive.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ REST Client Reactive support multipart messages.
REST Client Reactive allows sending data as multipart forms. This way you can for example
send files efficiently.

To send data as a multipart form, you can just use the regular `@RestForm` annotations:
To send data as a multipart form, you can just use the regular `@RestForm` (or `@FormParam`) annotations:

[source, java]
----
Expand All @@ -755,7 +755,7 @@ To send data as a multipart form, you can just use the regular `@RestForm` annot

Parameters specified as `File`, `Path`, `byte[]` or `Buffer` are sent as files and default to the
`application/octet-stream` MIME type. Other `@RestForm` parameter types default to the `text/plain`
MIME type. You can override these defaults with the `@RestPart` annotation.
MIME type. You can override these defaults with the `@PartType` annotation.

Naturally, you can also group these parameters into a containing class:

Expand Down Expand Up @@ -802,7 +802,7 @@ You can also send JSON multiparts by specifying the `@PartType` annotation:
@POST
@Path("/json")
String sendMultipart(@RestForm @RestPart(MediaType.APPLICATION_JSON) Person person);
String sendMultipart(@RestForm @PartType(MediaType.APPLICATION_JSON) Person person);
----

=== Receiving Multipart Messages
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/resteasy-reactive.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ public class MultipartResource {
}
----

The `name` parameter will contain the data contained in the part of HTTP request called `description` (because
The `description` parameter will contain the data contained in the part of HTTP request called `description` (because
link:{resteasy-reactive-common-api}/org/jboss/resteasy/reactive/RestForm.html[`@RestForm`] does not define a value, the field name is used),
while the `file` parameter will contain data about the uploaded file in the `image` part of HTTP request, and
the `person` parameter will read the `Person` entity using the `JSON` <<json,body reader>>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public String simple(
@Produces(MediaType.TEXT_PLAIN)
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Path("/blocking")
public Response blocking(@DefaultValue("1") @RestQuery Integer times, @BeanParam FormData formData) throws IOException {
public Response blocking(@DefaultValue("1") @RestQuery Integer times, FormData formData) throws IOException {
if (!BlockingOperationControl.isBlockingAllowed()) {
throw new RuntimeException("should have dispatched");
}
Expand All @@ -101,7 +101,7 @@ public Response blocking(@DefaultValue("1") @RestQuery Integer times, @BeanParam
@Produces(MediaType.TEXT_PLAIN)
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Path("/same-name")
public String sameName(@BeanParam FormDataSameFileName formData) {
public String sameName(FormDataSameFileName formData) {
if (!BlockingOperationControl.isBlockingAllowed()) {
throw new RuntimeException("should have dispatched");
}
Expand Down Expand Up @@ -129,7 +129,7 @@ public String sameName(@RestForm @PartType(MediaType.TEXT_PLAIN) Status status,
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Path("/optional")
@NonBlocking
public String optional(@BeanParam FormData formData) {
public String optional(FormData formData) {
if (BlockingOperationControl.isBlockingAllowed()) {
throw new RuntimeException("should not have dispatched");
}
Expand Down

0 comments on commit 44db973

Please sign in to comment.