Que tal, tengo un problema para enviar peticiones en HTTP POST, estoy enviando un login a servidor rails desde android, envio post con Asyntasck pero el problema es el que me arroja el siguiente error:
org.apache.http.conn.ConnectTimeoutException: Connect to /172.188.1.124:3000 timed out
Aquí tengo para enviar el post:
public String url_root="172.188.1.124:3000";
public String url_user_path="/users/:id.json";
public String url_api_v1_register_path= "/api/v1/registrations.json";
public String url_api_v1_login_path= "/api/v1/sessions.json";
public String url_api_v1_logout_path= "/api/v1/sessions.json";
HttpClient client = new DefaultHttpClient();
    HttpConnectionParams.setConnectionTimeout(client.getParams(), 10000);
    HttpResponse response;
    String postURL=url_root + url_api_v1_login_path;
    JSONObject json = new JSONObject();
    try {
        HttpPost post = new HttpPost(postURL);
        json.put("email", email);
        json.put("password", password);
        //json.put("confirmable_password", password);
        StringEntity se = new StringEntity(json.toString());
        se.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
        post.setEntity(se);
        response = client.execute(post);
        if (response != null) {
            InputStream in = response.getEntity().getContent();
            Log.e(TAG,"se recibió respuesta");
        } else{
            Log.e(TAG,"no se recibió respuesta");
        }
    } catch (Exception e) {
        e.printStackTrace();
        Log.e(TAG,"error en el post" + e);
    }
    return null;
}
Lo estoy haciendo desde un emulador en la misma máquina de forma local, no se si ese sea el problema.



