users@jersey.java.net

[Jersey] Re: Error message for PUT request not delivered to client

From: <oerding_at_match2blue.com>
Date: Tue, 29 Mar 2011 08:04:15 +0000 (GMT)

It seems to be a problem on the client side, using curl I got
{"error":{"code":105,"message":"Application key \"null\" is NOT
defined!"}}
exactly as expected.

My code for the request is:

final String url = "spheres/" + sphereName + "/accounts/" + email;
final WebResource putAccount = pat.getWebResource( url, user );
                
pat.response = putAccount.header( Constants.X_MATOOI_APIKEY, apiKey )
.type( MediaType.APPLICATION_FORM_URLENCODED ).put(
ClientResponse.class, sb.toString( ).getBytes( ) );

where the important point is the request putAccount.header... and sb is
a StringBuilder containing the JSON representation of the account to
update.

But I do not get it where my code is wrong.