Hi. The problem with `X-Requested-By` is that it shows up a lot even if it's not the problem. This issue was fixed in [XIVY-3097][1]. So if you are sending a modyfing request lik like PUT or POST and you are sure that you set X-Requested-By Header then it's other issue. What your problem probably is, is that you need to set MediaType boundary like
MediaType contentType = MediaType.MULTIPART_FORM_DATA_TYPE;
contentType = Boundary.addBoundary(contentType);
and use it in your entity as content-type.
And it will not work if you use *MediaType.MULTIPART_FORM_DATA_TYPE* instead of *contentType*
Example:
MediaType contentType = MediaType.MULTIPART_FORM_DATA_TYPE;
contentType = Boundary.addBoundary(contentType);
Response apacheConnectorResponse = client
.target(uri).request()
.header("X-Requested-By", "ivy")
.put(Entity.entity(createMultipart(realPdf), contentType));
You are able to see the full example in [ConnectivityDemos (7.3 and newer)][2] > rest > FileUpload
[1]: https://jira.axonivy.com/jira/browse/XIVY-3097
[2]: https://developer.axonivy.com/permalink/lib/dev/connectivity-demos.iar