title: Multiple POST requests, second request gets a 404 error code
body: <p>I am new to python and am having this same issue that was brought up as an issue on the requests GitHub. I am trying to authenticate to a website that redirects you to a security question after the initial login. Both the initial login and subsequent page use the same "action URL" and on the second post request I am receiving a 404, here is my code, any help would be greatly appreciated, after asking the question on GitHub they said it was a question to ask here as it wasn't on their end. (although they had an issue on their GitHub about this):</p>
  
  <pre><code>from bs4 import BeautifulSoup as bs
  import requests
  import time
  sources = ["https://www.dandh.com/v4/view?pageReq=dhMainNS"]
  req = requests.Session()
  
  
  def login():
      authentication_url = "https://www.dandh.com/v4/dh"
  
      header = {"user-agent": "Mozilla/5.0 (Windows NT 10.0; rv:60.0)      Gecko/20100101 Firefox/60.0"}
  
      payload = {"Login": "12345",
             "PW": "12345",
             "Request": "Login"}
  
      payload2 = {"securityAnswer": "12345",
              "Request": "postForm"}
  
      req.post(authentication_url, data=payload, headers=header)
  
      time.sleep(3)
  
      req.post(authentication_url, data=payload2, headers=header)
  
      time.sleep(3)
  
  
  def print_object(sources):
      for url in sources:
          soup_object = bs(req.get(url).text, "html.parser")
          print(soup_object.get_text())
  
  
  def main():
      login()
      print_object(sources)
  
  main()
  </code></pre>