title: http.client request method in Python 3
body: <p>When I run this code:</p>
  
  <pre><code>import http.client
  hR = ["/index.html"]
  conn = http.client.HTTPConnection("www.python.org", 80)
  conn.connect()
  conn.request("GET", hR)
  response = conn.getresponse()
  data = response.read()
  print (data)
  conn.close()
  </code></pre>
  
  <p>I receive the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Python32\files\fcon.py", line 5, in &lt;module&gt;
      conn.request("GET", hR)
    File "C:\Python32\lib\http\client.py", line 964, in request
      self._send_request(method, url, body, headers)
    File "C:\Python32\lib\http\client.py", line 992, in _send_request
      self.putrequest(method, url, **skips)
    File "C:\Python32\lib\http\client.py", line 877, in putrequest
      if url.startswith('http'):
  AttributeError: 'list' object has no attribute 'startswith'
  </code></pre>
  
  <p>Also, when I change the URL in line 3 to "<a href="http://python.org" rel="nofollow">http://python.org</a>" I receive a different error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Python32\files\fcon.py", line 4, in &lt;module&gt;
      conn.connect()
    File "C:\Python32\lib\http\client.py", line 721, in connect
      self.timeout, self.source_address)
    File "C:\Python32\lib\socket.py", line 380, in create_connection
      for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  socket.gaierror: [Errno 11001] getaddrinfo failed
  </code></pre>