title: Google API Read Pull Queue Java
body: <p>I'm trying to read a pull queue in java (Google API)</p>
  
  <p>Here is the code :</p>
  
  <pre><code>static HttpTransport newTransport() {
          HttpTransport result = new NetHttpTransport();
          GoogleUtils.useMethodOverride(result);
          GoogleHeaders headers = new GoogleHeaders();
          headers.setApplicationName("Google-TaskQueueSample/1.0");
          result.defaultHeaders = headers;
          return result;
      }
  </code></pre>
  
  <p>And my imports:</p>
  
  <pre><code>import com.google.api.client.googleapis.GoogleHeaders;
  import com.google.api.client.googleapis.GoogleUtils;
  import com.google.api.client.http.HttpTransport;
  import com.google.api.client.http.javanet.NetHttpTransport;
  </code></pre>
  
  <p>I have 2 errors in my code:
  the methods </p>
  
  <blockquote>
    <p>useMethodOverride</p>
  </blockquote>
  
  <p>and </p>
  
  <blockquote>
    <p>defaultHeaders</p>
  </blockquote>
  
  <p>doesn't exists and i took this code from the documentation here : <a href="https://developers.google.com/appengine/docs/java/taskqueue/overview-pull" rel="nofollow">https://developers.google.com/appengine/docs/java/taskqueue/overview-pull</a></p>