当设置ctx.body=undefined时,ctx.status会自动设置为204,即使ctx.body再次赋值时这个值也不会变
ctx.body = undefined;
console.log(ctx.status); // 204
ctx.body = 'success';
console.log(ctx.status); // 204
结果这个请求没有响应数据
当设置ctx.body=undefined时,ctx.status会自动设置为204,即使ctx.body再次赋值时这个值也不会变
ctx.body = undefined;
console.log(ctx.status); // 204
ctx.body = 'success';
console.log(ctx.status); // 204
结果这个请求没有响应数据