Hello,
can you do something like:
System.out.println("DEBUG: " + pot.response.getEntity(String.class));
?
I've tested something similar to your case and everything seems to work
as expected..
Pavel
On 3/29/11 10:04 AM, oerding_at_match2blue.com wrote:
> 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.
>