entity = new StringEntity(json, ContentType.APPLICATION_JSON);
} else {
final PipedOutputStream pipedOutputStream = new PipedOutputStream();
final PipedInputStream pipedInputStream = new PipedInputStream(pipedOutputStream);
PIPER.submit(new ExceptingRunnable() {
@Override
protected void go() throws Exception {
try {
ObjectMappers.NORMAL.writeValue(pipedOutputStream, payload);
pipedOutputStream.flush();