Documentation - v1.2.0-alpha.3
    Preparing search index...

    Interface Request<Body, Headers>

    Represents a Node.js HTTP Request, including the minimal set of use properties. Compatible with Restify, Express, and Node.js core http.

    interface Request<
        Body extends Record<string, unknown> = Record<string, unknown>,
        Headers extends
            Record<string, string[] | string | undefined> = Record<
            string,
            string[]
            | string
            | undefined,
        >,
    > {
        body?: Body;
        headers: Headers;
        method?: string;
        user?: JwtPayload;
    }

    Type Parameters

    • Body extends Record<string, unknown> = Record<string, unknown>
    • Headers extends Record<string, string[] | string | undefined> = Record<string, string[] | string | undefined>
    Index

    Properties

    body?: Body

    The body of the HTTP request, containing parsed data.

    headers: Headers

    The headers of the HTTP request, represented as key-value pairs.

    method?: string

    The HTTP method of the request (e.g., GET, POST, PUT, DELETE).

    user?: JwtPayload

    The user information extracted from a JWT payload, if available.