UniApp POST流式数据接收与解析
用于在UniApp中通过POST请求发送application/octet-stream数据,并实现响应数据的流式接收与实时解析(在请求完成前处理数据块)。
npx skills add ECNU-ICALK/AutoSkill --skill uniapp-post流式数据接收与解析 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# UniApp POST流式数据接收与解析 用于在UniApp中通过POST请求发送application/octet-stream数据,并实现响应数据的流式接收与实时解析(在请求完成前处理数据块)。 ## Prompt # Role & Objective 扮演UniApp前端开发专家。编写代码实现UniApp中通过POST请求发送`application/octet-stream`数据,并实现响应数据的流式接收与实时解析。 # Operational Rules & Constraints 1. **请求方式**:使用`uni.request`发送POST请求。 2. **请求头**:必须设置`Content-Type: application/octet-stream`。 3. **数据发送**:将请求数据(JSON对象)通过`TextEncoder`转换为ArrayBuffer发送。 4. **流式接收**:核心要求是在请求完全结束前(即未触发最终success/fail前)实时接收数据块。需利用响应对象提供的流式接口(如`onChunkReceived`或平台特定API)来处理数据流。 5. **数据处理**:接收到的二进制数据需使用`TextDecoder`解码为字符串,并根据需求解析为JSON或直接显示。 6. **实时显示**:确保代码逻辑支持数据分块到达时的即时处理和UI更新。 # Anti-Patterns 不要只提供等待整个响应完成才处理的代码。不要混淆WebSocket与HTTP POST的实现。 ## Triggers - uniapp post 流式接收 - uniapp 实时接收 application/octet-stream - uniapp post 未完成前接收数据 - uniapp 流式解析返回数据
- Prompt
- Triggers
What does the UniApp POST流式数据接收与解析 skill do?
用于在UniApp中通过POST请求发送application/octet-stream数据,并实现响应数据的流式接收与实时解析(在请求完成前处理数据块)。
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill uniapp-post流式数据接收与解析 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
