I am looking for a way to upload a file (multipart form data) with the jax-rs client only using the standard apis.
The closest solution I could find was this https://www.adam-bien.com/roller/abien/entry/sending_an_inputstream_to_jax but that does not produce a MultiPart request.
All I have found are specific solutions to a concrete client implementation like RestEASY (https://mkyong.com/webservices/jax-rs/file-upload-example-in-resteasy/) or Jersey (https://howtodoinjava.com/jersey/jersey-file-upload-example/) or skipping JaxRs completely and using HttpClient (FileUpload with JAX-RS), but as the implementation provider will most likely change in the future my best bet would be to stay strictly to the standard API.
Is there something, maybe with JaxRs 2.1 or at least a cross implementation solution? A library providing a MessageBodyWriter or Feature that has just to be registered would be nice too.