@buntal/core - Http

Req

Request class that extends the standard Request interface with additional properties for Buntal applications.

Source

View source on GitHub

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

PropertyTypeRequiredDefaultDescription
paramsP (default: Record<string, string>)-Route parameters extracted from URL patterns like /users/:id
queryRecord<string, string>-Query string parameters parsed from the URL
contextT (default: unknown)-Custom context data that can be attached by middleware
cookiesRecord<string, string>-Getter that returns all cookies from the request as an object

Last modified: 2025-06-10

Content-Length: 0