title: handling duplicate keys in HTTP post in order to specify multiple values
body: <h2>Background</h2>
  
  <ul>
  <li>python 2.7</li>
  <li>requests module</li>
  <li>http post with duplicate keys to specify multiple values</li>
  </ul>
  
  <h2>Problem</h2>
  
  <p>Trevor is using python requests with a website that takes duplicate keys to specify multiple values. The problem is, JSON and Python dictionaries do not allow duplicate keys, so only one of the keys makes it through.</p>
  
  <h3>Goal</h3>
  
  <ul>
  <li>The goal is to use python requests to create an HTTP post with duplicate keys for duplicate names in the POST name-value pairs.</li>
  </ul>
  
  <h3>Failed attempts</h3>
  
  <pre><code>## sample code
  payload = {'fname': 'homer', 'lname': 'simpson'
           , 'favefood': 'raw donuts'
           , 'favefood': 'free donuts'
           , 'favefood': 'cold donuts'
           , 'favefood': 'hot donuts'
           }
  rtt = requests.post("http://httpbin.org/post", data=payload)
  </code></pre>
  
  <h2>See also</h2>
  
  <p>Web links:</p>
  
  <ul>
  <li><a href="https://duckduckgo.com/?q=python+requests" rel="noreferrer">https://duckduckgo.com/?q=python+requests</a></li>
  </ul>
  
  <h2>Question</h2>
  
  <ul>
  <li>How can Trevor accomplish this task using python requests?</li>
  </ul>