Display JSON response from POST request
问题 I have to send a POST request containing the parameters 'username' and 'password'. I believe I did this below: public static void execute() { Map<String, String> comment = new HashMap<String, String>(); comment.put("username", login.getText().toString()); comment.put("password", password.getText().toString()); String json = new GsonBuilder().create().toJson(comment, Map.class); makeRequest("http://www.example.com", json); } public static HttpResponse makeRequest(String uri, String json) { try