Skip to content

Instantly share code, notes, and snippets.

@Viswanathantv
Created November 11, 2014 13:12
Show Gist options
  • Save Viswanathantv/3ecc1430febb0028348c to your computer and use it in GitHub Desktop.
Save Viswanathantv/3ecc1430febb0028348c to your computer and use it in GitHub Desktop.
java
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://104.131.4.231:1337/scoreboard/find");
try {
String data = "{\n" +
"\n" +
"\"where\": {\n" +
"\"age\":{\n" +
"\"<\" : 30\n" +
"} \n" +
"}\n" +
"\n" +
"}";
httppost.setEntity(new StringEntity(data));
HttpResponse result = httpclient.execute(httppost);
HttpEntity resultEntity = result.getEntity();
System.out.println(resultEntity);
} catch (ClientProtocolException e) {
System.out.print(e);
/**/
} catch (IOException e) {
/**/
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment