I want to send multi part form data to my spring boot rest controller.
Below is my code of request handler
@PostMapping(value = "/postmultipartformdata" , consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public String postFormData(@RequestBody MultiValueMap<String, String> formData) {
return "Welcome to the post method with multi part form data. Printing whatever is present in the body " + formData;
}
However whenever i send the request with form data from postman. I get this response back
"timestamp": "2020-07-02T05:10:40.320+00:00",
"status": 415,
"error": "Unsupported Media Type",
"message": "",
"path": "/postmultipartformdata"
Probably i am missing something very simple.
Best Regards,
Saurav