Skip to content

Empty body after form submit #361

Description

@PierBover

After submitting a regular HTML form the body appears empty on the Hono endpoint.

The content type arrives as expected but the body is completely empty:

<form method="post" action="/route">
endpoints.post('/route', async (c) => {
  const contentType = c.req.header('content-type');
  console.log('Content-Type Header:', contentType);
  
  const rawText = await c.req.text();
  console.log('Raw Body Text:', rawText);

  // etc
});

I'm guessing something happens with the body with Vite's dev server?

Not sure if this is out of scope for @hono/vite-dev-server though. If not maybe a note should be added to the README.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions