Puppeteer 中文文档v25.8.0

ResponseForRequest 接口

用于完成请求所需的响应数据。

签名

export interface ResponseForRequest

属性

属性

修饰符

类型

说明

默认值

body

string | Uint8Array

contentType

string

headers

Record<string, string | string[] | unknown>

可选的响应头。

记录中的值将按以下方式转换为字符串:数组的值将映射为 String(当需要多个同名响应头时使用)。非数组的值将转换为 String。

status

number