final HttpResponse response,
final HttpContext context) throws HttpException, IOException {
// Request content body has not been consumed!!!
response.setStatusCode(HttpStatus.SC_INTERNAL_SERVER_ERROR);
NStringEntity outgoing = new NStringEntity("Ooopsie");
response.setEntity(outgoing);
}
};
HttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
@Override
protected HttpRequest generateRequest(Job testjob) {
String s = testjob.getPattern() + "x" + testjob.getCount();
HttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("POST", s);
NStringEntity entity = null;
try {
entity = new NStringEntity(testjob.getExpected(), "US-ASCII");
entity.setChunked(testjob.getCount() % 2 == 0);
} catch (UnsupportedEncodingException ignore) {
}
r.setEntity(entity);
return r;
}