title: How can I debug my retrofit API call?
body: <p>I'm using retrofit to get some data from the Flickr api. The method I'm making the call in looks like this:</p>
  
  <pre><code>public static List&lt;String&gt; getImageIds(int size) {
      Call&lt;PhotosList&gt; call = flickrService.getPhotos(apiKey, format, "1");
      Log.d("TEMP_TAG", "photo url: " + call.request().url().toString());
      photoIds = new ArrayList&lt;String&gt;();
  
      call.enqueue(new Callback&lt;PhotosList&gt;(){
          @Override
          public void onResponse(Call&lt;PhotosList&gt; call, Response&lt;PhotosList&gt; response) {
              Log.d("TEMP_TAG", "it's getting here");
              PhotosList photosList = response.body();
              List&lt;Photo&gt; photos = photosList.getPhotos().getPhoto();
  
              for(Photo photo : photos) {
                  Log.d("TEMP_TAG", "adding photo id to list: " + photo.getId());
                  photoIds.add(photo.getId());
              }
          }
  
          @Override
          public void onFailure(Call&lt;PhotosList&gt; call, Throwable t) {
              // TODO: Clean up
              Log.d("TEMP_TAG", "photoId: ");
          }
      });
      Log.d("TEMP_TAG", "it's getting here too");
      return photoIds;
  }
  </code></pre>
  
  <p>However it is never getting into the <code>onResponse()</code> method. The first log statement within <code>onResponse()</code> never prints, neither does the log statement in <code>onFailure()</code>.  When I try entering the URL that is returned by <code>call.request().url().toString()</code> in the browser it works fine, and I get the expected JSON. Why is my <code>enqueue()</code> method never firing?</p>
  
  <p>Thanks for any help!</p>