import { Hono } from 'hono';import { authMiddleware } from '../middlewares/auth.js';import { validator } from 'hono/validator';const playlist = new Hono().use(authMiddleware);playlist.post('/create', async (ctx) => { console.log(await ctx.req.parseBody());});export default playlist;
<button onClick={() => { const formData = new FormData(); formData.append('name', 'test'); fetch('http://localhost:8000/playlist/create', { method: 'POST', headers: { 'Content-Type': 'multipart/form-data' }, body: formData, credentials: 'include' }).then((v) => { console.log(v); }); }} > send request </button>