I created simple Rest service to upload a file (in Spring web application), method looks like below:
@POST
@Path("/job/upload")
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces({ "application/json; charset=UTF-8" })
public Response upload(List<Attachment> attachments) {
LOG.info("Upload new picture to!");
// some unimportant code
}
I try to test it by RESTClient - Firefox plugin. When call this rest service I see : Status Code: 415 Unsupported Media Type
.
How can I test it? Can I add sample file in RESTClient and how can I do it?