title: Android Volley ImageLoader - How to use Basic HTTP Authorization?
body: <p>I want to use Volley's <code>NetworkImageView</code> to load images from my REST API that needs Basic HTTP Authorization. So i need to add headers to HTTP Request.</p>
  
  <p>I've made up following approaches:</p>
  
  <p><strong>Override <code>Request.getHeaders()</code></strong> - as described in <a href="https://stackoverflow.com/a/16819911/2203164">this question</a>.
  This would be fine, but the problem is that <code>ImageLoader</code> has <code>new ImageRequest()</code> hardcoded so I can't pass my <code>Request</code> implementation into <code>ImageLoader</code> and it cannot be easily inherited and tweaked (the method i'd need to reimplement uses private properties). </p>
  
  <p>The solution is to modify Volley library itself (what i'd like to avoid).</p>
  
  <p><strong>Use Custom HttpClientStack</strong> - as described <a href="http://ogrelab.ikratko.com/using-volley-android-with-external-httpclient-4-2-x/" rel="nofollow noreferrer">here</a>. 
  Using this approach i'd be able to intercept HTTP comunication and add necessary headers. But I think this is not the right way to do - I'd loose automatic selection of HttpClient by Volley (Gingerbread vs. HC and IC).</p>
  
  <hr>
  
  <p>Is there some simplier way to achive this that I'm missing?</p>