
Company News
Socket Named to Rising in Cyber 2026 List of Top Cybersecurity Startups
Socket was named to the Rising in Cyber 2026 list, recognizing 30 private cybersecurity startups selected by CISOs and security executives.
@zenweb/body
Advanced tools
支持 JSON、Form 等内容格式的基础解析模块
import { Context, mapping, Body, BodyHelper } from 'zenweb';
export class Controller {
@mapping({ path: '/', method: 'POST' })
post(body: Body) {
console.log(body.type); // POST body 内容类型
console.log(body.data); // POST Body 内容解析完成后的数据
}
@mapping({ path: '/', method: 'POST' })
post(body: BodyHelper) {
console.log(body.get({ age: '!int' })); // 类型转换&校验
}
}
| 项 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| encoding | string | 'utf-8' | 在未能匹配到 header 信息时,默认text内容编码格式 |
| limit | number | 1MB | 内容大小限制 |
| inflate | boolean | true | 是否支持压缩内容解压 |
| textTypes | string[] | ['text/*', 'json', '+json', 'xml', '+xml', 'urlencoded'] | 支持解析为文本的类型 |
| parses | BodyParserClass[] | [JSONParser, URLEncodedParser] | 对象解析器 |
FAQs
Zenweb Body module
The npm package @zenweb/body receives a total of 164 weekly downloads. As such, @zenweb/body popularity was classified as not popular.
We found that @zenweb/body demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket was named to the Rising in Cyber 2026 list, recognizing 30 private cybersecurity startups selected by CISOs and security executives.

Research
Socket detected 84 compromised TanStack npm package artifacts modified with suspected CI credential-stealing malware.

Security News
A dispute over fsnotify maintainer access set off supply chain alarms around one of Go’s most widely used filesystem libraries.