title: Using HttpGet returning complete HTML code
body: <p>I am trying to invoke a private web-service in which there's one link I've to access using <code>GET</code> method. While using the direct URL on browser (needs to login first), I get the data in JSON format. The URL I am invoking is like this  </p>
  
  <pre><code> http://www.example.com/trip/details/860720?format=json
  </code></pre>
  
  <p>The url is working fine, but when I invoke this using <code>HttpGet</code>, I am getting the HTML coding of the webpage, instead of the JSON String. The code I am using is as follows:   </p>
  
  <pre><code>private String runURL(String src,int id) {   //src="http://www.example.com/trip/details/"
      HttpClient httpclient = new DefaultHttpClient();   
      HttpGet httpget = new HttpGet(src); 
      String responseBody="";
          BasicHttpParams params=new BasicHttpParams();
          params.setParameter("domain", token); //The access token I am getting after the Login
          params.setParameter("format", "json");
          params.setParameter("id", id);
          try {
                  httpget.setParams(params);
                  HttpResponse response = httpclient.execute(httpget);
                  responseBody = EntityUtils.toString(response.getEntity());
                  Log.d("runURL", "response " + responseBody); //prints the complete HTML code of the web-page
              } catch (Exception e) {
                  e.printStackTrace();
          } 
          return responseBody;
  }
  </code></pre>
  
  <p>Can you tell me what am I doing wrong here??</p>