@lazarv/react-server/http
この API リファレンスはまだ翻訳されていません。以下は英語版の内容です。
Low-level HTTP context types shared across middleware, route handlers, and server functions.
interface CookieSerializeOptions {
domain?: string;
path?: string;
expires?: Date;
maxAge?: number;
httpOnly?: boolean;
secure?: boolean;
sameSite?: "Strict" | "Lax" | "None" | string;
}
interface HttpContext {
request: Request;
url: URL;
state: Record<string, any>;
next?: () => Promise<Response | undefined>;
platform?: {
runtime: string;
version?: string;
request?: any;
response?: any;
[key: string]: any;
};
[key: string]: any;
}
interface RequestContextExtensions {
cookie: Record<string, string>;
}