Hi!

I have made use of the Client API in jax-rs 2 and the mediaType is XML. So
far everything is working fine and I am able to send a pretty large entity.

Now I need to include multiple files? This is what I have now:


Response response =
client.target(builder).request(mediaType()).put(Entity.entity(dto,
mediaType()));

Just a simple post basically. Is it even best practice/possible to send
both files and DTO in the same post?

I know I can base64 the files but it seems to be considered awful by many
and I can understand that considering the increased size of the message.

I am thinking about posting the files i a separate post that needs to link
it with the previous request but that's just not very ACID :(

Any advice on this one? Cheers

Reply via email to