title: HTTP status code 200 vs 202
body: <p>I have a <code>Python</code>+<code>requests</code> script. </p>
  
  <p><em>Steps that script should execute</em>:</p>
  
  <ul>
  <li>send file to DB;</li>
  <li>approve this file (change file state in DB);</li>
  <li>download file.</li>
  </ul>
  
  <p><em>The constraint</em>: </p>
  
  <p><strong>Only approved file could be downloaded</strong></p>
  
  <p><em>My code</em>:</p>
  
  <pre><code>requests.post(url_to_create, files={"file": open(path_to_file)})
  requests.post(url_to_approve, data={'id': file_id})
  requests.get(url_to_download, data={'id': file_id})
  </code></pre>
  
  <p><em>The problem</em>: </p>
  
  <p>This code works almost perfectly, but sometimes I get no file. I found that the first and the third requests return <code>200</code> status code while the second returns <code>202</code>. As I understand (tell me if I wrong) status <code>202: Accepted</code> means that server accept request and return status code without actual request completion </p>
  
  <p><em>The question</em>: </p>
  
  <p>Does it mean that request to download could be send even if request to approve hasn't been already completed and, if it is so, how can I wait till approval-request completed before send download-request?</p>