title: Httpclient-4.5.2.jar setEntity showing "cannot find symbol" (JAVA - netbeans 8)
body: <p>I am trying to use some code that I got from a website that has sports data served publically via an API (<a href="http://developer.fantasydata.com" rel="nofollow">http://developer.fantasydata.com</a>).</p>
  
  <p>The site provide some sample JAVA code to make the http request.  For some reason the setEntity method for the declared request (request) is showing a "cannot find symbol error.</p>
  
  <pre><code>    package epl.fixtures.test.app;
  
  import java.net.URI;
  import org.apache.http.HttpEntity;
  import org.apache.http.HttpResponse;
  import org.apache.http.client.HttpClient;
  import org.apache.http.client.methods.HttpGet;
  import org.apache.http.client.utils.URIBuilder;
  import org.apache.http.entity.StringEntity;
  import org.apache.http.impl.client.HttpClients;
  import org.apache.http.util.EntityUtils;
  
  public class EPLFixturesTestApp {
  
      /**
       * @param args the command line arguments
       */
      public static void main(String[] args) {
          // TODO code application logic here
  
          HttpClient httpclient = HttpClients.createDefault();
  
          try
          {
              URIBuilder builder = new URIBuilder("https://api.fantasydata.net/soccer/v2/json/CompetitionDetails/EPL");
  
  
              URI uri = builder.build();
              HttpGet request = new HttpGet(uri);
              request.setHeader("Ocp-Apim-Subscription-Key", "****************");
  
  
              // Request body
              StringEntity reqEntity = new StringEntity("{body}");
              request.setEntity(reqEntity); 
  
              HttpResponse response = httpclient.execute(request);
              HttpEntity entity = response.getEntity();
  
              if (entity != null) 
              {
                  System.out.println(EntityUtils.toString(entity));
              }
          }
          catch (Exception e)
          {
              System.out.println(e.getMessage());
          }
  
      }
  
  }
  </code></pre>
  
  <p>The line causing the issue is the <em>request.setEntity(reqEntity);</em> line</p>
  
  <p>Can anyone explain this to me please?  I have all the relevant jar files from apache added to the project libraries directory.</p>
  
  <p>Thanks</p>