I've got an Asp.Net WebAPI running on my localhost, I can access to it from my computer using PostMan chrome extension, I can also connect to other applications hosted on my localhost from the Android Emulator but when I try to connect to the webApi with httpClient execute method it just returns a bad request html as result here is my Code..
ArrayList<NameValuePair> authParams = new ArrayList<NameValuePair>();
authParams.add(new BasicNameValuePair("cuentaAlumno", txtCuenta.getText().toString().trim()));
HttpClient httpClient = new DefaultHttpClient();
HttpGet httpPost = new HttpGet("http://10.0.2.2:5289/api/values/");
httpPost.setHeader("Content-Type", "application/json");
//httpPost.setEntity(new UrlEncodedFormEntity(authParams));
HttpResponse httpResponse = httpClient.execute(httpPost);
I tried accesing localhost from Emulator explorer and it's ok It shows the IIS home page, also it's working for other web Apps the problem is just with the Api