title: How to retrieve form data from Playwright Request object?
body: <p>I am adding a custom route handler to a Playwright page and I am trying to inspect the request passed into the handler. For context here is a following code snippet:</p>
  <pre class="lang-py prettyprint-override"><code>def handler(route: Route, request: Request):
      # Do things with `request`
      ...
  
  await page.route('**/*', handler=handler)
  </code></pre>
  <p>For <code>POST</code>/<code>PUT</code> requests with a <code>Content-Type</code> of <code>application/json</code>, I have been able to successfully inspect the payload by using <code>request.post_data_buffer</code>. However, when the <code>Content-Type</code> is <code>multipart/form-data</code>, I have not been able locate where I can get the form data. All of the <code>post_data</code>, <code>post_data_buffer</code>, and <code>post_data_json</code> properties have a value of <code>None</code>, and I couldn't see anything else in the documentation which could contain the <code>form_data</code>.</p>