
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
@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 48 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.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.