I have the following code:
JSONObject jsonRequest = new JSONObject();
jsonRequest.put("id", 1);
jsonRequest.put("method", "mymethod");
entity = new JSONEntity(jsonRequest);
HttpPost request = new HttpPost("http://192.168.1.103/foo/bar.php");
request.setEntity(entity);
HttpResponse response = httpClient.execute(request);
Irrelevant code removed
It posts to a .php page. On the .php page I call var_dump
to check the content of both $_POST and $_GET. Both are empty.
Any idea?