len = reader.read(buf, 0, bufSize); } else if (jsonContentType(contentType)) { InputStreamReader reader = new InputStreamReader(bodyStream); JSONTokener jt = new JSONTokener(reader);
len = reader.read(buf, 0, bufSize); } else if (jsonContentType(contentType)) { InputStreamReader reader = new InputStreamReader(bodyStream); JSONTokener jt = new JSONTokener(reader);
if (jsonContentType(contentType)) { requestEntity = new StringEntity(XMLtoJSON.convert(body), ContentType.create(contentType, "UTF-8")); } else if (xmlContentType(contentType)) {
if (jsonContentType(contentType)) { requestEntity = new StringEntity(XMLtoJSON.convert(body), ContentType.create(contentType, "UTF-8")); } else if (xmlContentType(contentType)) {
if (!detailed && (xmlContentType(contentType) || jsonContentType(contentType))) { readBodyContentPart(tree, bodyStream, contentType, charset); } else { tree.addStartElement(XProcConstants.c_body); tree.addAttribute(_content_type, contentType); if (!xmlContentType(contentType) && !textContentType(contentType) && !jsonContentType(contentType)) { tree.addAttribute(_encoding, "base64");
if (!detailed && (xmlContentType(contentType) || jsonContentType(contentType))) { readBodyContentPart(tree, bodyStream, contentType, charset); } else { tree.addStartElement(XProcConstants.c_body); tree.addAttribute(_content_type, contentType); if (!xmlContentType(contentType) && !textContentType(contentType) && !jsonContentType(contentType)) { tree.addAttribute(_encoding, "base64");
writer.close(); byteContent.append(writer.toString()); } else if (jsonContentType(contentType)) { byteContent.append(XMLtoJSON.convert(body)); } else if (!encodeBinary && "base64".equals(bodyEncoding)) {
writer.close(); byteContent.append(writer.toString()); } else if (jsonContentType(contentType)) { byteContent.append(XMLtoJSON.convert(body)); } else if (!encodeBinary && "base64".equals(bodyEncoding)) {