requestEntity.writeRequest(outstream);
public InputStream getMessagePayload() throws IOException { InputStream body = null; if(httpMethod instanceof PostMethod){ PostMethod postMethod = (PostMethod) httpMethod; ByteArrayOutputStream out = new ByteArrayOutputStream(); postMethod.getRequestEntity().writeRequest(out); body = new ByteArrayInputStream(out.toByteArray()); }else{ throw new IllegalStateException("HTTP method " + httpMethod.getName() + " not supported"); } return body; }
requestEntity.writeRequest(outstream);
requestEntity.writeRequest(outstream);
requestEntity.writeRequest(outstream);
requestEntity.writeRequest(outstream);
try { ByteArrayOutputStream requestOut = new ByteArrayOutputStream(); ((EntityEnclosingMethod) m).getRequestEntity().writeRequest(requestOut); LOG.debug("Http Request Body : {}", requestOut.toString()); } catch (IOException e) {