java - ClientRequestFactory RestEasy Deprecated... Any other RestEasy alternative ? -


i need create rest-easy client, using de interface of restservice created others... that's work good, except 1 thing...

when update rest-easy 2.3.5.final rest-easy 3.0.x, clientrequestfactory class appear @deprecated.

the actual code is:

clientrequestfactory crf = new clientrequestfactory(uribuilder.fromuri("http://url-of-service").build()); somerestinterface client = crf.createproxy(somerestinterface.class); client.themethod(); 

any one, alternative of rest-easy clientrequestfactory @ version 3.0.x?

resteasy client-api has been marked deprecated jax-rs standardized client-api. can find information resteasy-integration of new client-api in documentation.

your example (untested):

client client = clientbuilder.newclient(); response response = client.target("http://url-of-service").request().get(); // read , close response 

or if want use resteasy proxy framework:

client client = clientfactory.newclient(); resteasywebtarget target = (resteasywebtarget) client.target("http://url-of-service"); somerestinterface client = target.proxy(somerestinterface.class); client.themethod(); 

Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -