When in my browser I send the following string to a control unit I have http://192.168.0.215/i_activate/aterm?40~00
and a relay is activated.
I have tried many variations of the following:
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://192.168.0.215/i_activate/aterm?40~00");
// Execute HTTP Post Request
HttpResponse response = httpclient.execute(httppost);
With an HTML response "FAIL" from the unit
I have tried adding the 40~00 in many ways (NameValuePair, etc) and encoded in different forms without success but I am sure the problem lies there.
Any thoughts?