HttpServerRequest Interface

An HTTP server request object.

Extends

  • Readable

Methods

Name Description
destroy(error?: Error): void    
setTimeout(msecs: number, callback: () => void): this    

Inherited methods

Name Inherited from Description
constructor(opts?: ReadableOptions): HttpServerRequest Readable  
Symbol.asyncIterator(): AsyncIterableIterator<any> Readable.Symbol  
_destroy(error: Error | null, callback: (error: Error | null) => void): void Readable  
_read(size: number): void Readable  
addListener(event: "close" = undefined, listener: () => void): this Readable Event emitter
addListener(event: "data" = undefined, listener: (chunk: any) => void): this Readable  
addListener(event: "end" = undefined, listener: () => void): this Readable  
addListener(event: "readable" = undefined, listener: () => void): this Readable  
addListener(event: "error" = undefined, listener: (err: Error) => void): this Readable  
addListener(event: string | symbol, listener: (...args: any[]) => void): this Readable  
emit(event: "close" = undefined): boolean Readable  
emit(event: "data" = undefined, chunk: any): boolean Readable  
emit(event: "end" = undefined): boolean Readable  
emit(event: "readable" = undefined): boolean Readable  
emit(event: "error" = undefined, err: Error): boolean Readable  
emit(event: string | symbol, ...args: any[]): boolean Readable  
eventNames(): Array<string | symbol> EventEmitter  
getMaxListeners(): number EventEmitter  
isPaused(): boolean Readable  
listenerCount(type: string | symbol): number EventEmitter  
listeners(event: string | symbol): Function[] EventEmitter  
off(event: string | symbol, listener: (...args: any[]) => void): this EventEmitter  
on(event: "close" = undefined, listener: () => void): this Readable  
on(event: "data" = undefined, listener: (chunk: any) => void): this Readable  
on(event: "end" = undefined, listener: () => void): this Readable  
on(event: "readable" = undefined, listener: () => void): this Readable  
on(event: "error" = undefined, listener: (err: Error) => void): this Readable  
on(event: string | symbol, listener: (...args: any[]) => void): this Readable  
once(event: "close" = undefined, listener: () => void): this Readable  
once(event: "data" = undefined, listener: (chunk: any) => void): this Readable  
once(event: "end" = undefined, listener: () => void): this Readable  
once(event: "readable" = undefined, listener: () => void): this Readable  
once(event: "error" = undefined, listener: (err: Error) => void): this Readable  
once(event: string | symbol, listener: (...args: any[]) => void): this Readable  
pause(): this Readable  
pipe<T extends WritableStream>(destination: T extends WritableStream, options?: { end?: undefined | false | true }): T extends WritableStream internal  
prependListener(event: "close" = undefined, listener: () => void): this Readable  
prependListener(event: "data" = undefined, listener: (chunk: any) => void): this Readable  
prependListener(event: "end" = undefined, listener: () => void): this Readable  
prependListener(event: "readable" = undefined, listener: () => void): this Readable  
prependListener(event: "error" = undefined, listener: (err: Error) => void): this Readable  
prependListener(event: string | symbol, listener: (...args: any[]) => void): this Readable  
prependOnceListener(event: "close" = undefined, listener: () => void): this Readable  
prependOnceListener(event: "data" = undefined, listener: (chunk: any) => void): this Readable  
prependOnceListener(event: "end" = undefined, listener: () => void): this Readable  
prependOnceListener(event: "readable" = undefined, listener: () => void): this Readable  
prependOnceListener(event: "error" = undefined, listener: (err: Error) => void): this Readable  
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this Readable  
push(chunk: any, encoding?: string): boolean Readable  
rawListeners(event: string | symbol): Function[] EventEmitter  
read(size?: number): any Readable  
removeAllListeners(event?: string | symbol): this EventEmitter  
removeListener(event: "close" = undefined, listener: () => void): this Readable  
removeListener(event: "data" = undefined, listener: (chunk: any) => void): this Readable  
removeListener(event: "end" = undefined, listener: () => void): this Readable  
removeListener(event: "readable" = undefined, listener: () => void): this Readable  
removeListener(event: "error" = undefined, listener: (err: Error) => void): this Readable  
removeListener(event: string | symbol, listener: (...args: any[]) => void): this Readable  
resume(): this Readable  
setEncoding(encoding: string): this Readable  
setMaxListeners(n: number): this EventEmitter  
unpipe(destination?: NodeJS.WritableStream): this Readable  
unshift(chunk: any): void Readable  
wrap(oldStream: ReadableStream): this Readable  
listenerCount(emitter: EventEmitter, event: string | symbol): number Static EventEmitter  

Properties

Name Type Description
body string | Buffer    
connection any    
header (field: string) => string | undefined    
headers [header: string]: string | string[] | undefined    
httpVersion string    
httpVersionMajor number    
httpVersionMinor number    
ip undefined | string    
method string    
path string    
rawHeaders string[]    
rawTrailers string[]    
socket any    
statusCode undefined | number    
statusMessage undefined | string    
trailers [key: string]: string | undefined    
url undefined | string    

Inherited properties

Name Type Inherited from Description
readable boolean Readable  
readableHighWaterMark number Readable  
readableLength number Readable  
defaultMaxListeners Static number EventEmitter  

Defined in

Last Updated: 13 June, 2024