This is my code:
String httpURL = "http://codespeed_server:8000/result/add/"; URL myurl = new URL(httpURL); HttpURLConnection con = (HttpURLConnection) myurl.openConnection(); con.setDoOutput(true); DataOutputStream output = new DataOutputStream(con.getOutputStream()); output.writeBytes(query); Can anybody tell me why this only works when I trail to it:
con.getResponseCode(); ? The server only gets new entries when I call getResponseCode(). Is it a normal behavior ? Or is it a server-side issue ?
con.getResponseCode(), what happens? Show what you do afterwriteBytes().output.close()oroutput.flush()afterwards?