curveball / core

The Curveball framework is a TypeScript framework for node.js with support for modern HTTP features.
https://curveballjs.org/
MIT License
525 stars 7 forks source link

Move to standard Request and Response objects #201

Closed evert closed 1 year ago

evert commented 2 years ago

The Request and Response objects are becoming standard everywhere. Deno uses them, and so does Bun. When Curveball was created they were still up and coming, so it ships its own Request and Response types that look a lot like Koa's.

I think for Curveball to stay relevant, it should probably adopt these interfaces. The biggest issue with this is that this is a drastic BC break. I also don't even fully know if it's possible to do this, given that Curveball assumes that the Response object is mutable and potentially changed by middlewares.