A universal type that request handling extensions (e.g. express, next) can map their request to. This allows ContextProviders to build consistent interfacese on any web framework. Headers must be lowercase to ensure portability.

interface RequestData<T = any> {
    headers: Record<string, string>;
    input: T;
    method: "GET" | "PUT" | "POST" | "DELETE" | "OPTIONS" | "QUERY";
}

Type Parameters

  • T = any

Properties

Properties

headers: Record<string, string>
input: T
method: "GET" | "PUT" | "POST" | "DELETE" | "OPTIONS" | "QUERY"