packages/doodoo.js/lib/application.js
/**
     * Use a body middleware
     * @description The middleware is finally loaded by default, which can be manually invoked.
     */
Use a body middleware
@description The middleware is finally loaded by default, which can be manually invoked.
Use a body middleware @description The middleware is finally loaded by default which can be manually invoked .
body(opts = {}) {
        this.useBody = true;
        this.use(async (ctx, next) => {
            if (!ctx.skipBody) {
                await body(Object.assign({ multipart: true }, opts))(
                    ctx,
                    async () => {
                        ctx.post = ctx.request.body;
                        ctx.file = ctx.request.files;
                    }
                );
            }
            await next();
        });
    }
body ( opts = { } ) { this . useBody = true ; this . use ( async ( ctx , next ) => { if ( ! ctx . skipBody ) { await body ( Object . assign ( { multipart : true } , opts ) ) ( ctx , async ( ) => { ctx . post = ctx . request . body ; ctx . file = ctx . request . files ; } ) ; } await next ( ) ; } ) ; }
Use a body middleware
 @description The middleware is finally loaded by default, which can be manually invoked.
Use a body middleware @description The middleware is finally loaded by default which can be manually invoked .
// step 3