What I would like to do is send an HTTP POST request to the REST web service. However, it seems that my application cannot connect to the host. When sending a request, the application throws the following exception:
10-19 18:54:05.335: VERBOSE/SD(280): java.net.UnknownHostException: http://www.myhost.com
10-19 18:54:05.335: VERBOSE/SD(280): at java.net.InetAddress.lookupHostByName(InetAddress.java:513)
10-19 18:54:05.335: VERBOSE/SD(280): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:280)
10-19 18:54:05.335: VERBOSE/SD(280): at java.net.InetAddress.getByName(InetAddress.java:310)
The host definitely exists, and the specified URL is correct. I can also call the URL using the Android emulator browser. The application contains the following in AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET" />
Has anyone ever experienced something like this?
Hi Robert
source
share