I came across this piece of code today :
client.post(getApplicationContext(),url, entity,"application/json", new JsonHttpResponseHandler() {
@Override
public void onSuccess(int statusCode, Header[] headers, JSONObject response) {
System.out.println(statusCode);
}
@Override
public void onFailure(int statusCode, Header[] headers,String responseString, Throwable throwable) {
// called when response HTTP status is "4XX" (eg. 401, 403, 404)
}
})
What exactly is being attempted and is it even legal ? It does not throw any errors when compiling....