OutputStream outputStream = connection.getOutputStream();
outputStream.write(dataItems.toString().getBytes());
outputStream.close();
int responseCode = connection.getResponseCode();
InputStream inputStream = null;
<BUG>Map result = FastMap.newInstance();
if (responseCode == HttpURLConnection.HTTP_CREATED ||</BUG>
responseCode == HttpURLConnection.HTTP_OK) {
inputStream = connection.getInputStream();
<BUG>String response = toString(inputStream);
result = ServiceUtil.returnSuccess(response);</BUG>
} else {

OutputStream outputStream = connection.getOutputStream();
outputStream.write(dataItems.toString().getBytes());
outputStream.close();
int responseCode = connection.getResponseCode();
InputStream inputStream = null;
Map result = FastMap.newInstance();
String response = null;
if (responseCode == HttpURLConnection.HTTP_CREATED ||
responseCode == HttpURLConnection.HTTP_OK) {
inputStream = connection.getInputStream();
response = toString(inputStream);
result = ServiceUtil.returnSuccess(response);
} else {
