You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
defhandler(route: Route, request: Request):
# Do things with `request`
...
awaitpage.route('**/*', handler=handler)
For POST/PUT requests with a Content-Type of application/json, I have been able to successfully inspect the payload by using request.post_data_buffer. However, when the Content-Type is multipart/form-data, I have not been able locate where I can get the form data. All of the post_data, post_data_buffer, and post_data_json properties have a value of None, and I couldn't see anything else in the documentation which could contain the form_data.
I added a similar question to the generic playwright GitHub here
Could this also be a bug? I was not sure which is why I hesitated to open this as a bug
The text was updated successfully, but these errors were encountered:
Your question
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:
For
POST
/PUT
requests with aContent-Type
ofapplication/json
, I have been able to successfully inspect the payload by usingrequest.post_data_buffer
. However, when theContent-Type
ismultipart/form-data
, I have not been able locate where I can get the form data. All of thepost_data
,post_data_buffer
, andpost_data_json
properties have a value ofNone
, and I couldn't see anything else in the documentation which could contain theform_data
.I added a similar question to the generic playwright GitHub here
Could this also be a bug? I was not sure which is why I hesitated to open this as a bug
The text was updated successfully, but these errors were encountered: