/** * Reads the response body from the given http servlet request. * * @param request http servlet request * @param exchange the exchange * @return the request body, can be <tt>null</tt> if no body * @throws IOException is thrown if error reading response body */ public static Object readRequestBodyFromServletRequest(HttpServletRequest request, Exchange exchange) throws IOException { InputStream is = HttpConverter.toInputStream(request, exchange); return readResponseBodyFromInputStream(is, exchange); }
Object body = HttpHelper.readResponseBodyFromInputStream(method.getResponseBodyAsStream(), exchange);