Puppeteer 中文文档v25.8.0

HTTPResponse.json() 方法

一个 Promise,其解析为响应体的 JSON 表示。

签名

class HTTPResponse {
  json(): Promise<any>;
}

返回值:

Promise<any>

备注

如果响应体无法通过 JSON.parse 解析,此方法将抛出错误。