title: how to use requests.post() with proxy authentication in python?
body: <pre><code>from bs4 import BeautifulSoup
  import requests
  from requests.auth import HTTPProxyAuth
  
  url = "http://www.transtats.bts.gov/Data_Elements.aspx?Data=2" 
  proxies = {"http":"xxx.xxx.x.xxx: port"}
  auth = HTTPProxyAuth("username", "password")
  r = requests.get(url, proxies=proxies, auth=auth)
  soup = BeautifulSoup(r.text,"html.parser") 
  viewstate_element = soup.find(id = "__VIEWSTATE").attrs 
  viewstate = viewstate_element["value"]
  eventvalidation_element = soup.find(id="__EVENTVALIDATION").attrs
  eventvalidation = eventvalidation_element["value"]
  
  
  data =     {'AirportList':"BOS",'CarrierList':"VX",'Submit':'Submit',"__EVENTTARGET":"","__EVENTARGUMENT":"","__EVENTVALIDATION":eventvalidation,"}
  r = requests.post(url, proxies, auth, data )
  print r
  </code></pre>
  
  <p>This code works fine when I use <code>requests.get(url, proxies=proxies, auth=auth)</code>, but what to do when there is some data that has to be sent through <code>requests.post()</code> under proxy authentication?</p>