title: Python call URL with key=value pairs
body: <p>Since I do my first steps in Python, I try to figure out, how can I do a simple URL call in Python with key=value pairs like:</p>
  
  <pre><code>http://somehost/somecontroller/action?key1=value1&amp;key2=value2
  </code></pre>
  
  <p>I tried with some things like:</p>
  
  <pre><code>key1 = 'value'
  key2 = 10
  requests.get("http://somehost/somecontroller/action?key1=" + value + "&amp;key2=" + str(10))
  </code></pre>
  
  <p>or</p>
  
  <pre><code>data={'key1': 'value', 'key2': str(10)}
  requests.get("http://somehost/somecontroller/action", params=data)
  </code></pre>
  
  <p>(from <a href="https://stackoverflow.com/questions/22974772/querystring-array-parameters-in-python-using-requests">here</a>)</p>
  
  <p>But this don't work. I also tried it by calling <code>curl</code> with <code>subprocess.Popen()</code> on different ways, but uhm...</p>
  
  <p>I don't want to check the request, the URL call will be enough.</p>