Skip to content

Instantly share code, notes, and snippets.

@Nikamura
Created March 5, 2014 19:50
Show Gist options
  • Save Nikamura/9375150 to your computer and use it in GitHub Desktop.
Save Nikamura/9375150 to your computer and use it in GitHub Desktop.
JSONObject data = new JSONObject();
String response;
try {
data.put("function", "postForSale");
JSONArray arguments = new JSONArray();
// post_for_sale($title,$uid,$cid,$desc,$cost,$media,$cond)
// First argument is title
// Second argument is uid
arguments.put(title);
arguments.put(uid);
...
data.put("arguments", arguments);
} catch (JSONException e1) {
e1.printStackTrace();
}
response = HttpEncryption.post(data.toString());
return false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment