import HTTP from 'http'; import Stream from 'stream'; import ExecutionContext, { Session } from '@fc3/execution-context'; import { NetworkProtocol } from '@fc3/network'; import { TagMap } from '@fc3/metrics'; import Request from './../request'; import HttpHeader from './../enum/header'; import ContentType from './../enum/content-type'; import PathParameters from './../type/path-parameters'; declare class IncomingRequest extends Request { private native_request; private path_parameters; constructor(native_request: HTTP.IncomingMessage, execution_context: ExecutionContext); setPathParameters(path_parameters: PathParameters): void; getProtocol(): NetworkProtocol; getOrigin(): string; getRemoteAddress(): string; getAcceptedContentTypes(): ContentType[]; hasOrigin(): boolean; hasParameter(key: string): boolean; getParameter(key: string): any; getQueryParameter(key: string): string | string[] | undefined; getPathParameter(key: string): string | undefined; /** * We want this method to be publicly accessible, but only for this class, * as opposed to all HttpTransaction subclasses. */ end(): void; getSessionIdFromCookie(): string | undefined; hasSessionIdFromCookie(): boolean; setSession(session: Session): this; getSession(): Session | undefined; getStream(): Stream.Readable; parseBody(): Promise; getAllowedCorsOrigin(): string; /** * When the browser makes a CORS request, it will normally request the ability * to send certain headers to the server. We should just parrot back whatever * value they request if so. However, if they *don't* explicitly request a * list of headers, we should return the ones that we think it is most likely * to send. */ getAllowedCorsHeaders(): HttpHeader[]; getNativeRequest(): HTTP.IncomingMessage; protected getCountMetricName(): string; protected getTimingMetricName(): string; protected getMetricTags(): TagMap; private hasPathParameter; private hasQueryParameter; private hasParsableMethod; private getBodyParameter; private hasBodyParameter; private getPathParameters; private updateExecutionContext; } export default IncomingRequest;