Description
I am using spring boot along with Apache CXF. My REST API definition looks as below
@PUT
@Consumes(value = {MediaType.MULTIPART_FORM_DATA})
@ApiOperation(value = "Sends a notification")
public boolean sendNotificationPut(
@FormParam(QueryParams.SUBJECT) String subject,
@FormParam(QueryParams.MESSAGE) String message) {
}
---------------------------------------------------------------------------
When we hit via REST client, we are always getting 400.
> PUT /rest/notifications HTTP/1.1
> Host: localhost:9080
> User-Agent: insomnia/2020.3.3
> Content-Type: multipart/form-data; boundary=X-INSOMNIA-BOUNDARY
> Accept: /
> Content-Length: 231
--X-INSOMNIA-BOUNDARY |
Content-Disposition: form-data; name="subject" |
A new topic has been created |
--X-INSOMNIA-BOUNDARY |
Content-Disposition: form-data; name="message" |
A new topic has been created |
--X-INSOMNIA-BOUNDARY-- |
- We are completely uploaded and fine
- Mark bundle as not supporting multiuse
< HTTP/1.1 400
< Content-Encoding: UTF-8
< Date: Tue, 04 Aug 2020 05:08:42 GMT
< Content-Type: text/plain
< Content-Length: 50
< Connection: close