Jersey を使用して、GET 要求を実行できるようにしたいと考えています。これにより、サーバー コードは、json オブジェクトを返す別のリソースで HTTP 要求を作成します。JerseyにはクライアントAPIとサーバーAPIの両方が別々にあることを知っています.2つを組み合わせる方法はありますか?
@Path("/helloworld")
public class GetData {
@GET
public String getResource() throws IOException {
String result;
//Insert code to make an http request to localhost/someobject.json and store it in a variable
return result;
}
}