title: Android HttpClient to just send data to server using get request
body: <p>I want to access a parameterized url with Android. All it has to do is "load" the page so that it does what its supposed to do (update database with parameters given).</p>
  
  <p>I was having trouble just loading the url so I watched a video on regular HttpClient activity -- just waiting for the response and gathering that information. I figured that it would still be loading the page and therefore also letting that page execute. I can't even get that to run the page correctly or gather a response.</p>
  
  <p>Here's the code I used:</p>
  
  <pre><code>String url = "http://www.removed.com?param1="+param1+"&amp;param2="+param2;
  
          try{
              HttpClient httpclient = new DefaultHttpClient();
              HttpGet httpget = new HttpGet(url);
              HttpResponse response = httpclient.execute(httpget);
              HttpEntity entity = response.getEntity();
              InputStream webs = entity.getContent();
              try{
                  BufferedReader reader = new BufferedReader(new InputStreamReader(webs, "iso-8859-1"), 8 );
                  test.setText(reader.readLine());
                  webs.close();
              }catch(Exception e) {
                  Log.e("Error in conversion: ", e.toString());
              }
          }catch(Exception e) {
              Log.e("Error in connection: ", e.toString());
          }
  </code></pre>
  
  <p>Please let me know what I can do to get this to execute the page and update the database. If I put in the parameters manually into a browser, it works.</p>