I am trying to write something to an empty file on my apache server
myClient= new DefaultHttpClient();
StringEntity myString = new StringEntity("important message");
HttpPost httpPost = new HttpPost("http://10.0.218.211/myfile");
httpPost.setEntity(myString);
HttpResponse response = myClient.execute(httpPost);
The reponse returns “HTTP/1.1 200 OK” so it does find the file
I tried removing the file and it returned Error 404
I read apache’s docs and looks like am doing it right “i think”
My problem is… the contents of the file do not get updated!
An example would be great!
Try this:
AndroidManifest.xml
post.php
myfile.xml