Skip to content Skip to sidebar Skip to footer

Android: How To Send Variable Parameters With Gethttp?

I'm new in Android and I am blocked with a problem I don't know how to solve: from my app I'm trying to send a message of this form to a server in order to modify a xml file on th

Solution 1:

It looks like you are just executing HTTP GET to your server. Calling

new RequestTask().execute("https://myserver/index.php?x0=" + x00 + "&y0=" + y00 + "&z0=" + z00);

will do what you want.

Solution 2:

In doInBackground(String... uri) method, try something like this:

DefaultHttpClientclient1=newDefaultHttpClient();
HttpResponseresponse=null;
HttpGethttpGet=null;

try {
    httpGet = newHttpGet(URL); 
    response = client1.execute(httpGet);
    ......
}

Post a Comment for "Android: How To Send Variable Parameters With Gethttp?"