Properties
Optional body
body: string | Buffer
end
end: (body?: string | Buffer) => void
Type declaration
-
- (body?: string | Buffer): void
-
Parameters
-
Optional body: string | Buffer
Returns void
getHeader
getHeader: (name: string) => string | string[]
Type declaration
-
- (name: string): string | string[]
-
Parameters
Returns string | string[]
getHeaders
getHeaders: () => {}
removeHeader
removeHeader: (name: string) => void
setHeader
setHeader: (name: string, value: any) => void
Type declaration
-
- (name: string, value: any): void
Optional statusCode
statusCode: undefined | number
Optional statusMessage
statusMessage: undefined | string
writeHead
write
Head: (statusCode: number, statusMessageOrHeaders?: Headers | string, headers?: Headers) => void
Type declaration
-
- (statusCode: number, statusMessageOrHeaders?: Headers | string, headers?: Headers): void
-
Parameters
-
statusCode: number
-
Optional statusMessageOrHeaders: Headers | string
-
Optional headers: Headers
Returns void
Represents an outgoing response.