Releases: adonisjs/http-server
Release 8.0.0-next.13
8.0.0-next.13 (2025-12-02)
Breaking Changes
Renamed Request and Response classes
Migration required: The Request and Response classes have been renamed to HttpRequest and HttpResponse to avoid conflicts with platform-native global classes.
What you need to do:
Update your imports and type annotations:
// Before
import { Request, Response } from '@adonisjs/core/http'
// After
import { HttpRequest, HttpResponse } from '@adonisjs/core/http'Why this change? Modern JavaScript runtimes expose native Request and Response classes globally, which created naming conflicts and confusion. This rename provides better clarity and prevents ambiguity between AdonisJS classes and platform-native APIs.
New Features
Platform-native Response support
You can now return platform-native Response objects directly via the response.send() method. This enables seamless integration with libraries that return standard Response objects, such as Vercel's AI SDK.
import { streamText } from 'ai'
async handle({ response }: HttpContext) {
const result = await streamText({
model: openai('gpt-4'),
prompt: 'Write a story'
})
return result.toUIMessageStreamResponse()
}Custom response serializers
You can now define custom serializers to control how response data is serialized before being sent to the client. This is particularly useful for:
- Adding custom serialization logic for specific data types
- Implementing organization-wide response formatting standards
- Handling special object types
Configuration:
// config/app.ts
{
http: definedConfig({
serializeJSON: (value) => {
return JSON.stringify(value)
}
})
}Bug Fixes
- Ensure x-request-id header is always set on responses (#111) 5566086, closes #111
- pending references of Response class ab5694a
Commits
- add support for handling platform native Response and rename our classes d5d971a
- add support for using a custom JSON serializer for outgoing response aebbdc3
- migrate to cookie-es 30533b3
- throw proper error when url builder does not receive routes in correct shape d8d9efa
PRS
- Ensure x-request-id header is always set on responses by @ThisIsMissEm in #111
New Contributors
- @ThisIsMissEm made their first contribution in #111
Full Changelog: v8.0.0-next.12...v8.0.0-next.13
Changes to the generateRoutes helper
8.0.0-next.12 (2025-10-19)
Features
- export types for routes, imports, and types helpers from the generateRoutes method (4ff57d4)
Full Changelog: v8.0.0-next.11...v8.0.0-next.12
Allow URL builder param types to be string, number, boolean and bigint
8.0.0-next.11 (2025-10-19)
Features
- allow url_builder param types to be string, number, boolean, and bigint (629fc35)
- mention method name in route not found error (2271c4e)
Full Changelog: v8.0.0-next.10...v8.0.0-next.11
Add URLBuilder client and uppercase method names returned from the URL builder
8.0.0-next.10 (2025-10-10)
Features
- add form property to url_builder return type (a67d16c)
- add url_builder client and redoc (6d815d0)
- uppercase method name when returning from the url_builder (257a264)
Full Changelog: v8.0.0-next.9...v8.0.0-next.10
Add appendQueryString helpers and expose QS module
8.0.0-next.9 (2025-10-09)
Features
- add appendQueryString helper (ebfd3da)
- export query string module (6977d3b)
- format generated types properly (df3a7c8)
Full Changelog: v8.0.0-next.8...v8.0.0-next.9
Do not put HTTP methods in quotes when generating types
8.0.0-next.8 (2025-09-30)
Bug Fixes
- do not put HTTP methods in quotes when generating types (2aa8771)
Full Changelog: v8.0.0-next.7...v8.0.0-next.8
Export NextFn type helper
8.0.0-next.7 (2025-09-08)
Features
- export NextFn type helper (838c317)
Full Changelog: v8.0.0-next.6...v8.0.0-next.7
Fix error handler broken code after using tracing
8.0.0-next.6 (2025-08-31)
Bug Fixes
- pass this context to error handler when tracing the handle method (8cae7c9)
Full Changelog: v8.0.0-next.5...v8.0.0-next.6
Fix URL builder types
8.0.0-next.5 (2025-08-26)
Bug Fixes
- url builder types helpers (57e3f15)
Full Changelog: v8.0.0-next.4...v8.0.0-next.5
Do not generate types when there are no routes
8.0.0-next.4 (2025-08-26)
Bug Fixes
- do not attempt to generate types when there are no routes (e0b3c64)
- do not generate route name when unable to infer controller name (8f50d0c)
Full Changelog: v8.0.0-next.3...v8.0.0-next.4