HTTPResponse.headers() 方法
🌐 HTTPResponse.headers() method
一个与响应相关联的具有 HTTP 头的对象。所有头名称都是小写的。重复的头值会合并为一个用逗号分隔的列表,除了 Set-Cookie,其由 \n 分隔。
🌐 An object with HTTP headers associated with the response. All header names are lower-case. Duplicate header values are combined into a single comma-separated list except for Set-Cookie that is separated by \n.
语法
🌐 Signature
class HTTPResponse {
abstract headers(): Record<string, string>;
}
返回:
Record<string, string>