What should we use for ClientResponse and GenericType in latest version (3.0.x) Resteasy?

后端 未结 2 1999
后悔当初
后悔当初 2021-01-15 12:25

I am developing Resteasy. I migrated my application\'s maven dependencies from 2.2.x to 3.0.x and suddenly I saw most of the API\'s ar

2条回答
  •  借酒劲吻你
    2021-01-15 13:02

    The Resteasy Client-API has been marked deprecated as JAX-RS standardized a Client-API. You can now use the equivalent javax.ws.rs classes:

    javax.ws.rs.client.Client client = javax.ws.rs.client.ClientBuilder.newClient();
    javax.ws.rs.client.WebTarget target = client.target("someUrl");
    List students = 
        target.request().get(new javax.ws.rs.core.GenericType>() {});
    

提交回复
热议问题