title: Python requests.get() VS Powershell Invoke-WebRequest -Uri
body: <p>I was measuring page load time for my site. I used Python <code>requests.get(url)</code>method which once in a while gives me this huge response times (12+ seconds).  but when I try using PowerShell, <code>Invoke-WebRequest -Uri</code>, it never exceeds 1 second.</p>
  
  <p>I was wondering what the difference are between these two methods is and what the best approach would be.</p>
  
  <p>Python:</p>
  
  <pre class="lang-python prettyprint-override"><code>r = requests.get(url)
  r.elapsed.total_seconds() 
  </code></pre>
  
  <p>PowerShell:</p>
  
  <pre class="lang-bsh prettyprint-override"><code>$result1 = Measure-Command { $request = Invoke-WebRequest -Uri $url }
  $result1.TotalMilliseconds
  </code></pre>