Req
Request class that extends the standard Request interface with additional properties for Buntal applications.
Source
Type Definition
class Req<P = Record<string, string>, T = unknown> extends Request {
public params: P
public query?: Record<string, string>
public context?: T
get cookies(): Record<string, string>
}
Properties
Property | Type | Required | Default | Description |
---|---|---|---|---|
params | P (default: Record<string, string>) | ✅ | - | Route parameters extracted from URL patterns like /users/:id |
query | Record<string, string> | ❌ | - | Query string parameters parsed from the URL |
context | T (default: unknown) | ❌ | - | Custom context data that can be attached by middleware |
cookies | Record<string, string> | ✅ | - | Getter that returns all cookies from the request as an object |
Last modified: 2025-06-10