how to make httpPost call with json encoded body?
i am using following code to make an httpPost call but it is returning me 400 bad request when i try to give following parameters in "simple rest client" in chrome extension it works fine any one guide me what mistake am i doing here? Simple rest Client I entered the following: URL: http://jon2012.com/api/register Method: POST Headers: No headers, as they are not required Data: { "email": "test@example.com", "first_name":"Name" } Android Code: HttpClient client = new DefaultHttpClient(); HttpConnectionParams.setConnectionTimeout(client.getParams(), 10000); //Timeout Limit HttpResponse response