我正在向 Playwright 页面添加一个自定义路由处理程序,并且我正在尝试检查传递给处理程序的请求。对于上下文,这里是以下代码片段:
def handler(route: Route, request: Request):
# Do things with `request`
...
await page.route('**/*', handler=handler)
对于带有of 的POST/请求,我已经能够使用. 但是,当is时,我无法找到可以获取表单数据的位置。所有、和属性的值都是,我在文档中看不到任何其他可能包含.PUTContent-Typeapplication/jsonrequest.post_data_bufferContent-Typemultipart/form-datapost_datapost_data_bufferpost_data_jsonNoneform_data