users@jersey.java.net

[Jersey] Re: Jersey Client WebResource delete with request entity?

From: moshebeeri <moshe.beeri_at_gmail.com>
Date: Sat, 24 Dec 2011 15:48:06 -0800 (PST)

The problem is that the default client produces synchronous WebResource to
grab the response back.
When using @DELETE there is no need to synchronize request for idempotent
requirement.
I just changes the call to the following format and it works like charm

ClientConfig clientConfig = new DefaultClientConfig();
clientConfig.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING,
Boolean.TRUE);
Client c = Client.create(clientConfig);
AsyncWebResource ar =
c.*asyncResource*("http://127.0.0.1:8888/r/at/delete");
r.delete(Status.class, reqStatus);

Code Well,
Moshe Beeri.


--
View this message in context: http://jersey.576304.n2.nabble.com/Jersey-Client-WebResource-delete-with-request-entity-tp4150141p7125102.html
Sent from the Jersey mailing list archive at Nabble.com.