rescu
rescu copied to clipboard
What is the best practice to consume MULTIPART_FORM_DATA
Like this:
@POST
@Path("/upload")
@Consumes(MediaType.MULTIPART_FORM_DATA)
void updateFile(File file) throws IOException;
java.lang.IllegalArgumentException: Unsupported media type: multipart/form-data
at si.mazi.rescu.RequestWriterResolver.resolveWriter(RequestWriterResolver.java:57)
See https://github.com/go-resty/resty#multipart-files-upload as well.
rescu doesn't currently support accessing multipart/form-data services and there is no such support planned.
If you wish to implement this in rescu, we can discuss how to best do this.
Maybe expose the RequestWriterResolver
to let user add their own RequestWriter
.
Seems doable. If you submit a pull request, I'll be happy to review it.