UNPKG

@chubbyjs/psr-http-message

Version:

Common Http-message Interface (PHP FIG PSR-7).

24 lines (23 loc) 965 B
import RequestInterface from './RequestInterface'; export declare type QueryParamsValue = { [key: string]: QueryParams; } | Array<QueryParams> | string; export declare type QueryParams = { [key: string]: QueryParamsValue; }; export declare type ParsedBody = { [key: string]: ParsedBody; } | Array<ParsedBody> | string | number | boolean | null; interface ServerRequestInterface extends RequestInterface { getCookieParams(): Map<string, string>; withCookieParams(cookieParams: Map<string, string>): this; getQueryParams(): QueryParams; withQueryParams(queryParams: QueryParams): this; getParsedBody(): ParsedBody | undefined; withParsedBody(parsedBody: ParsedBody | undefined): this; getAttributes(): Map<string, unknown>; getAttribute(name: string, defaultValue?: unknown): unknown; withAttribute(name: string, value: unknown): this; withoutAttribute(name: string): this; } export default ServerRequestInterface;