sb.append("blah blah blah blah\r\n");
sb.append("yada yada yada yada\r\n");
}
String s = sb.toString();
HttpAsyncRequestProducer httppost = HttpAsyncMethods.createPost(
target.toURI() + "/echo/stuff", s,
ContentType.create("text/plain", HTTP.ASCII));
BufferingCharConsumer consumer = Mockito.spy(new BufferingCharConsumer());
Future<String> future = this.httpclient.execute(httppost, consumer, null);
String result = future.get();