mercredi 10 octobre 2018

Jersey Java Reflection

I am a beginner in Jersey library.. I am stuck on the following statement:

Client c = Client.create();
WebResource web = c.resource(url);
ClientResponse resp = web.accept(MediaType.APPLICATION_JSON).get(ClientResponse.class) // Why are we using reflection here?

Also Reflection is also used in :

resp.getEntity(String.class); // Why are we passing class<String> to getEntity()?





Aucun commentaire:

Enregistrer un commentaire