title: BrowserMob Proxy Python - How to get response body?
body: <p>I need to get the response body content for a POST request using Selenium Chrome driver and browsermob proxy. Currently this content is not included in my file HAR output when i read it although i can see the response in the browser network traffic. How can i make it so response traffic is captured? (sorry new to programming and can't see much python documentation for BMP)</p>
  
  <pre>
  
      server.start()
      proxy = server.create_proxy()
      chrome_options = webdriver.ChromeOptions()
      chrome_options.add_argument("--proxy-server={0}".format(proxy.proxy)) 
      driver = webdriver.Chrome(executable_path="chromedriver.exe", chrome_options=chrome_options)
  
      proxy.new_har("req", options={'captureHeaders': True,'captureContent':True})
      driver.get('https://www.example.com/something')
  
  
      result_har = json.dumps(proxy.har, ensure_ascii=False)
      with open("haroutput.har", "w") as harfile:
          harfile.write(result_har)
  
      server.stop()
      driver.quit()
  
  </pre>