final HttpURLConnection urlConnection) throws IOException {
Payload.Outbound payload = null;
ParameterMap parameters = null;
ActionReport ar = null;
if (entity instanceof ParamsWithPayload) {
ParamsWithPayload pwp = (ParamsWithPayload) entity;
payload = pwp.getPayloadOutbound();
parameters = pwp.getParameters();
ar = pwp.getActionReport();
} else if (entity instanceof Payload.Outbound) {
payload = (Payload.Outbound) entity;
}
writeTo(payload, parameters, ar,
new OutputStream() {