Thanks! The correct mime type solved the problem :-)
By the way, is it possible to get the output stream?
I've to implement an interface which expects an outputstream, it is called during a file upload. The HTTPClient code looks like this:
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
connection.setDoInput(true);
connection.setDoOutput(true);
connection.setRequestMethod("PUT");
connection.setRequestProperty("Content-Type", MediaType.APPLICATION_OCTET_STREAM);
return connection.getOutputStream();
Is this also possible with jersey?
Gesendet: Mittwoch, 05. März 2014 um 22:03 Uhr
Von: "Craig McClanahan" <craigmcc@gmail.com>
An: users@jersey.java.net
Betreff: [Jersey] Re: Jersey Client 2.6 PUT request
I don't know if this is your whole problem, but "/xml" is not a valid MIME type. It should be "application/xml" instead.