Days
Hours
Minutes
Seconds
URL url = new URL("https://www.planyo.com/rest/?reservation_id=9905282&reservation_ids=&action=Checkin&custom_data=&comment=&api_key=c971c0135da9d3d779ec857c13a770b84188bf93d541ba34c93b67c46ece6f&method=do_reservation_action"); HttpURLConnection http = (HttpURLConnection)url.openConnection(); http.setRequestMethod("POST"); http.setDoOutput(true); http.setRequestProperty("Accept", "application/json"); http.setRequestProperty("Content-Type", "application/json"); String data = "{\n \"Id\": 78912,\n \"Customer\": \"Jason Sweet\",\n \"Quantity\": 1,\n \"Price\": 18.00\n}"; byte[] out = data.getBytes(StandardCharsets.UTF_8); OutputStream stream = http.getOutputStream(); stream.write(out); System.out.println(http.getResponseCode() + " " + http.getResponseMessage()); http.disconnect();