String requestJson = "{\"requestHeader\"={\"requestTS\":\"2021-04-27T09:31:07.000\", \"requestMessageID\":\"test998\"},\"requestData\"={\"binRangeSearchIndex\":\"0\", \"binRangeCount\":\"500\"}}";
try (DataOutputStream wr = new DataOutputStream(con.getOutputStream())) {
wr.writeBytes(String.valueOf(requestJson.getBytes(StandardCharsets.UTF_8)));
wr.flush();
}
Solved! Go to Solution