| ● | GET | https://api.example.com/v1/profile | 200 | 86 ms |
| ● | POST | https://api.example.com/v1/messages | 200 | SSE |
| ● | GET | https://cdn.example.com/app.js | 304 | 21 ms |
| ● | GET | https://api.example.com/v1/orders/9 | 404 | 64 ms |
| ● | PUT | https://api.example.com/v1/cart | 502 | 1.1 s |
// 给匹配的请求加 Header,并改写返回的 JSON
async function onRequest(context, url, request) {
request.headers["X-Debug"] = "1";
return request;
}
async function onResponse(context, url, request, response) {
response.body.plan = "pro";
return response;
}
内置 MCP 服务,提供 41 个工具。Claude Code 能搜索请求、定位错误、创建 Mock、放行断点。
Authorization、Cookie 和 token 默认脱敏。你可以指定 AI 看不到的域名,或只给它读权限。
连接 Claude Code →找出刚才的 5xx,看看问题出在哪个服务
3 个失败都来自 cart 服务的上游超时。要我用 Map Local 先 Mock 这个接口吗?
对话为示意。