Shubha P
Shubha P

Reputation: 31

How to read Form Data in JAX RS response?

Problem: I have to make JAX RS client call for GET HTTP method. But, the response is a Form data. I need help in knowing how to read the response which is of type FormData.

Ex: ClientConfig config = new ClientConfig(); Client client = ClientBuilder.newClient(config); Response res = client.target("Some HTTP URL").request().header(Some headers).get(); response.readEntity(MediaType.APPLICATION_FORM_URLENCODED.getClass());

Questions:

  1. What is the return type of --> response.readEntity(MediaType.APPLICATION_FORM_URLENCODED.getClass());
  2. I need to parse the form data and retreive few values.

Help me as I am new to JAX RS and Jersey

Need help in the return type for reading FormData and parsing it.

Upvotes: 0

Views: 23

Answers (0)

Related Questions