I have a JSON
body as Java String
. I would like to convert this String
to RestAssured Response
. Is this possible?
Or
Is it possible to convert apache HttpResponse
to RestAssured Response
HttpClient httpClient = HttpClientBuilder.create().build();
HttpPost httpPost = new HttpPost(url);
org.apache.http.entity.StringEntity entity = new org.apache.http.entity.StringEntity(body);
httpPost.setEntity(entity);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Content-type", "application/json");
HttpResponse httpResponse = httpClient.execute(httpPost);
I'd like to convert httpResponse
to RestAssured Response