I am making a request to an API and getting a response status code of 200
.
Response of the api includes a json
response.
import javax.ws.rs.core.Response;
Response response = webclient.post(SomeReqString);
How can I retrieve the json
response as string from the web client response?
You can use following code
String responseAsString = response.readEntity(String.class);