users@jersey.java.net

[Jersey] com.sun.jersey.api.client.WebResource heder

From: tomaz <tomaz.majerhold_at_arnes.si>
Date: Thu, 14 Mar 2013 13:45:23 +0100

maven := com.sun.jersey: jersey-client : 1.17

I'm trying to add propertie to HTTP header, but when I look in TCPMon there is no additional header value, so REST server returning general error.

I'm doing:
--------------
webResource.header("reason", reason);
ClientResponse clientResponse = webResource
                                    .path("/users/"+username)
                                    .accept(MediaType.APPLICATION_XML_TYPE)
                                    .post(ClientResponse.class);

---------------
And there is NO HTTP header name of reason in HTTP header, what I'm doing wrong?


Regards, Tomaz