title: java.lang.IllegalStateException: Cannot access request header fields after connection is set
body: <p>I am downloading an image file from server using normal Thread and getting <code>IllegalStatementException</code> </p>
  
  <p><img src="https://i.stack.imgur.com/GaCWz.png" alt="this the log"> </p>
  
  <p>and this is the method I am calling from a background Thread </p>
  
  <p><img src="https://i.stack.imgur.com/dGSg5.png" alt="method">. </p>
  
  <p>Hint: I am on a <code>Fragment</code> not in <code>Activity</code>.</p>