ResponseForRequest 接口
🌐 ResponseForRequest interface
满足请求所需的响应数据。
🌐 Required response data to fulfill a request with.
语法
🌐 Signature
export interface ResponseForRequest
属性
🌐 Properties
属性 🌐 Property | 修饰符 🌐 Modifiers | 类型 🌐 Type | 描述 🌐 Description | 默认 🌐 Default |
|---|---|---|---|---|
| body | 字符串 | Uint8Array 🌐 string | Uint8Array | |||
| contentType | string | |||
| headers | Record<string, string | string[] | unknown> | 可选的响应标头。 🌐 Optional response headers. 记录值将按以下方式转换为字符串:数组的值将映射为字符串(当你需要多个相同名称的标题时使用)。非数组将被转换为字符串。 🌐 The record values will be converted to string following: Arrays' values will be mapped to String (Used when you need multiple headers with the same name). Non-arrays will be converted to String. | ||
| status | number |