zents
Version:
ZenTS is a Node.js & TypeScript MVC-Framework for building rich web applications, released as free and open-source software under the MIT License. It is designed for building web applications with modern tools and design patterns.
35 lines (34 loc) • 1.22 kB
TypeScript
/// <reference types="node" />
import type { IncomingParams, ParsedBody, QueryString } from '../types/interfaces';
import type { IncomingMessage } from 'http';
import type { JsonValue } from 'type-fest';
import { RequestHeader } from './RequestHeader';
import type { Socket } from 'net';
export declare class Request {
nodeReq: IncomingMessage;
header: RequestHeader;
protected _body: JsonValue;
protected _query: QueryString;
protected _params: IncomingParams;
protected _pathname: string;
constructor(nodeReq: IncomingMessage, parsedBody: ParsedBody, params: IncomingParams);
get body(): JsonValue;
set body(body: JsonValue);
get params(): IncomingParams;
set params(params: IncomingParams);
get query(): QueryString;
set query(query: QueryString);
get querystring(): string;
set querystring(querystring: string);
get search(): string;
get url(): string;
set url(url: string);
get httpMethod(): string;
set httpMethod(httpMethod: string);
get pathname(): string;
set pathname(pathname: string);
get httpVersion(): string;
get httpVersionMajor(): number;
get httpVersionMinor(): number;
get socket(): Socket;
}