I want to connect with my web API, its URL is http://localhost:55154/
, with android emulator.
AsyncHttpClient client = new AsyncHttpClient();
client.get("http://10.0.2.2:55154/api/values", new AsyncHttpResponseHandler() {
@Override
public void onSuccess(String response) {
System.out.println(response);
}
});
I'm getting no response, however, when I connect to google.pl
I'm getting a proper response.
I have tried multiple variants with the localhost address, but none is working.
Im using this liblary for my async connection:
http://loopj.com/android-async-http/
UPDATE:
When I'm running my program I'm getting the following error from the LogCat
07-17 08:58:26.495: E/Trace(879): error opening trace file: No such file or directory (2)
However I am able to conect with http://localhost:55154/api/values
via my browser.