seamapi / edgespec

☃️ an API framework for everywhere.
MIT License
5 stars 2 forks source link

Bun's `req.clone()` does not clone bodies properly yet (warning) #151

Open seveibar opened 8 months ago

seveibar commented 8 months ago

Edgespec doesn't work with Bun.serve because of this bug. Took a while to debug, so I wanted to share the learning. https://github.com/oven-sh/bun/pull/8668

You can easily get a proper request shim with:

import { Request as EdgeRuntimeRequest } from "@edge-runtime/primitives"

image

codetheweb commented 8 months ago

huh, interesting

happy to accept a PR for a bun adapter if you think it's applicable