We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
readme文档中操作请求章节的代码为
exports.handleRequest = async (ctx, request) => { // ctx.fullUrl 可以获取请求url // ctx.headers 可以获取请求头 // ctx.options 里面包含一些特殊的请求头字段,分别可以获取一些额外信息,如请设置的规则等 // ctx.method 获取和设置请求方法 // ctx.req // ctx.res const { req, res } = ctx; const client = request((svrRes) => { res.writeHead(svrRes.statusCode, svrRes.headers); svrRes.pipe(res); // try { // const body = await ctx.getStreamBuffer(svrRes); // delete svrRes.headers['content-encoding']; // res.writeHead(svrRes.statusCode, svrRes.headers); // res.end(body); // } catch (err) {} }); req.pipe(client); };
与该章节内容不符合,且与demo 图片内容不符合,可能造成误解,望大佬修复下
Sorry, something went wrong.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: