final URL url = config.getUrl();
HttpEntity entity = null;
// Prepare requests for each thread
if (config.getPayloadFile() != null) {
final FileEntity fe = new FileEntity(config.getPayloadFile());
fe.setContentType(config.getContentType());
fe.setChunked(config.isUseChunking());
entity = fe;
} else if (config.getPayloadText() != null) {
final StringEntity se = new StringEntity(config.getPayloadText(),
ContentType.parse(config.getContentType()));
se.setChunked(config.isUseChunking());