Replies: 1 comment 7 replies
-
What container are you running in? I recently added an example of using a multipart standalone application https://github.com/resteasy/resteasy-examples/tree/main/standalone-multipart. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Using 6.2.5.Final, an endpoint which accepts
multipart/form-data
with two parameters like:@FormParam("password") String password
@FormParam("file") InputStream stream
was returning an unexpected 400 if the
String
parameter is omitted in the request.REPRODUCTION STEPS
Construct an endpoint as below, and then try submitting multipart form data of various combinations (each part could be omitted, be a file upload, or be plain form data).
I get an unexpected 400 for the following curl commands:
I get the expected 204 for the following curl commands:
WORKAROUND
To workaround, I have had to use
EntityPart.getContent(String.class)
to manually convert the provided form data into a String.Beta Was this translation helpful? Give feedback.
All reactions