if (urlConnection.getResponseCode() == HttpURLConnection.HTTP_INTERNAL_ERROR) {
is = urlConnection.getErrorStream();
} else {
is = urlConnection.getInputStream();
}
ParamsWithPayload pwp = reader.readFrom(is, resultMediaType);
if (pwp.getPayloadInbound() == null) {
setActionReport(pwp.getActionReport());
} else if (resultMediaType.startsWith("multipart/")) {
RestPayloadImpl.Inbound inbound = pwp.getPayloadInbound();
setActionReport(pwp.getActionReport());