In the line : httpget.setEntity(new UrlEncodedFormEntity(nameValuePairs)); 
I am getting error as: The method setEntity(UrlEncodedFormEntity) is undefined for the type HttpGet
CODE:
        HttpClient httpclient = new DefaultHttpClient();
        // Add the header data for the request
        List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);
        nameValuePairs.add(new BasicNameValuePair("phonenumber","12345"));
        nameValuePairs.add(new BasicNameValuePair("authtoken", "12345"));
        HttpGet httpget = new HttpGet(url);
        httpget.setEntity(new UrlEncodedFormEntity(nameValuePairs));
        // Execute HTTP Post Request
        HttpResponse response = httpclient.execute(httpget);
 
     
     
     
    