Skip to content

Logger should not read formData #43

@joebnb

Description

@joebnb

What versions are running?

latest

What steps can reproduce the bug?

logger should not read formData, because this field are implemented by async/await(Promise),if Promise full filled, it's can‘t be use again,it will throw already used by elysia when user want read things form formData.

export const app = new Elysia()
    // .use(
    //     logger({
    //         level: 'info',
    //     })
    // )
    .use(staticPlugin())
    .use(trafficControl())
    .use(useFileRoute(path.join(__dirname, 'api')));

// in a post handler
const formData = await ctx.request.formData();
console.log('dta',formData);  // will never print this, if not comment use logger in app entry

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions