
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 } from 'zenweb';
export class Controller {
@mapping({ path: '/', method: 'POST' })
post(body: Body) {
console.log(body.type); // POST body 内容类型
console.log(body.data); // POST Body 内容解析完成后的对象
}
}
通过客户端提交的 Content-Type 头信息判断内容格式
| 项 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| json | JsonOption | boolean | true | 解析 json 格式 |
| form | FormOption | boolean | true | 解析表单请求 |
| text | TextOption | boolean | true | 解析纯文本 |
| 项 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| encoding | string | 'utf-8' | 内容编码 |
| limit | string | '1mb' | 内容大小限制 |
| 项 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| strict | boolean | true | 严格模式, 提交的内容必须为 {} 或 [] 开头 |
无其他配置项
无其他配置项
使用依赖注入重构,去除 xml 和 文件上传表单支持,取消的这两个作为独立模块分离。
FAQs
Zenweb Body module
The npm package @zenweb/body receives a total of 65 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.