Search
Preparing search index...
The search index is not available
u-http-server
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Globals
"http2"
Http2ServerResponse
Class Http2ServerResponse
Hierarchy
Stream
Http2ServerResponse
Index
Constructors
constructor
Properties
connection
finished
headers
Sent
send
Date
socket
status
Code
status
Message
stream
default
Max
Listeners
Methods
add
Listener
add
Trailers
create
Push
Response
emit
end
event
Names
get
Header
get
Header
Names
get
Headers
get
Max
Listeners
has
Header
listener
Count
listeners
off
on
once
pipe
prepend
Listener
prepend
Once
Listener
raw
Listeners
remove
All
Listeners
remove
Header
remove
Listener
set
Header
set
Max
Listeners
set
Timeout
write
write
Continue
write
Head
listener
Count
Constructors
Private
constructor
new
Http2
Server
Response
(
)
:
Http2ServerResponse
Returns
Http2ServerResponse
Properties
connection
connection
:
Socket
|
TLSSocket
finished
finished
:
boolean
headers
Sent
headers
Sent
:
boolean
send
Date
send
Date
:
boolean
socket
socket
:
Socket
|
TLSSocket
status
Code
status
Code
:
number
status
Message
status
Message
:
""
stream
stream
:
ServerHttp2Stream
Static
default
Max
Listeners
default
Max
Listeners
:
number
Methods
add
Listener
add
Listener
(
event
:
"close"
, listener
:
function
)
:
this
add
Listener
(
event
:
"drain"
, listener
:
function
)
:
this
add
Listener
(
event
:
"error"
, listener
:
function
)
:
this
add
Listener
(
event
:
"finish"
, listener
:
function
)
:
this
add
Listener
(
event
:
"pipe"
, listener
:
function
)
:
this
add
Listener
(
event
:
"unpipe"
, listener
:
function
)
:
this
add
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
"close"
listener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"drain"
listener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"error"
listener:
function
(
error
:
Error
)
:
void
Parameters
error:
Error
Returns
void
Returns
this
Parameters
event:
"finish"
listener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"pipe"
listener:
function
(
src
:
stream.Readable
)
:
void
Parameters
src:
stream.Readable
Returns
void
Returns
this
Parameters
event:
"unpipe"
listener:
function
(
src
:
stream.Readable
)
:
void
Parameters
src:
stream.Readable
Returns
void
Returns
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
add
Trailers
add
Trailers
(
trailers
:
OutgoingHttpHeaders
)
:
void
Parameters
trailers:
OutgoingHttpHeaders
Returns
void
create
Push
Response
create
Push
Response
(
headers
:
OutgoingHttpHeaders
, callback
:
function
)
:
void
Parameters
headers:
OutgoingHttpHeaders
callback:
function
(
err
:
Error
|
null
, res
:
Http2ServerResponse
)
:
void
Parameters
err:
Error
|
null
res:
Http2ServerResponse
Returns
void
Returns
void
emit
emit
(
event
:
"close"
)
:
boolean
emit
(
event
:
"drain"
)
:
boolean
emit
(
event
:
"error"
, error
:
Error
)
:
boolean
emit
(
event
:
"finish"
)
:
boolean
emit
(
event
:
"pipe"
, src
:
stream.Readable
)
:
boolean
emit
(
event
:
"unpipe"
, src
:
stream.Readable
)
:
boolean
emit
(
event
:
string
|
symbol
,
...
args
:
any
[]
)
:
boolean
Parameters
event:
"close"
Returns
boolean
Parameters
event:
"drain"
Returns
boolean
Parameters
event:
"error"
error:
Error
Returns
boolean
Parameters
event:
"finish"
Returns
boolean
Parameters
event:
"pipe"
src:
stream.Readable
Returns
boolean
Parameters
event:
"unpipe"
src:
stream.Readable
Returns
boolean
Parameters
event:
string
|
symbol
Rest
...
args:
any
[]
Returns
boolean
end
end
(
callback
?:
function
)
:
void
end
(
data
:
string
|
Uint8Array
, callback
?:
function
)
:
void
end
(
data
:
string
|
Uint8Array
, encoding
:
string
, callback
?:
function
)
:
void
Parameters
Optional
callback:
function
(
)
:
void
Returns
void
Returns
void
Parameters
data:
string
|
Uint8Array
Optional
callback:
function
(
)
:
void
Returns
void
Returns
void
Parameters
data:
string
|
Uint8Array
encoding:
string
Optional
callback:
function
(
)
:
void
Returns
void
Returns
void
event
Names
event
Names
(
)
:
Array
<
string
|
symbol
>
Returns
Array
<
string
|
symbol
>
get
Header
get
Header
(
name
:
string
)
:
string
Parameters
name:
string
Returns
string
get
Header
Names
get
Header
Names
(
)
:
string
[]
Returns
string
[]
get
Headers
get
Headers
(
)
:
OutgoingHttpHeaders
Returns
OutgoingHttpHeaders
get
Max
Listeners
get
Max
Listeners
(
)
:
number
Returns
number
has
Header
has
Header
(
name
:
string
)
:
boolean
Parameters
name:
string
Returns
boolean
listener
Count
listener
Count
(
type
:
string
|
symbol
)
:
number
Parameters
type:
string
|
symbol
Returns
number
listeners
listeners
(
event
:
string
|
symbol
)
:
Function
[]
Parameters
event:
string
|
symbol
Returns
Function
[]
off
off
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
on
on
(
event
:
"close"
, listener
:
function
)
:
this
on
(
event
:
"drain"
, listener
:
function
)
:
this
on
(
event
:
"error"
, listener
:
function
)
:
this
on
(
event
:
"finish"
, listener
:
function
)
:
this
on
(
event
:
"pipe"
, listener
:
function
)
:
this
on
(
event
:
"unpipe"
, listener
:
function
)
:
this
on
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
"close"
listener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"drain"
listener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"error"
listener:
function
(
error
:
Error
)
:
void
Parameters
error:
Error
Returns
void
Returns
this
Parameters
event:
"finish"
listener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"pipe"
listener:
function
(
src
:
stream.Readable
)
:
void
Parameters
src:
stream.Readable
Returns
void
Returns
this
Parameters
event:
"unpipe"
listener:
function
(
src
:
stream.Readable
)
:
void
Parameters
src:
stream.Readable
Returns
void
Returns
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
once
once
(
event
:
"close"
, listener
:
function
)
:
this
once
(
event
:
"drain"
, listener
:
function
)
:
this
once
(
event
:
"error"
, listener
:
function
)
:
this
once
(
event
:
"finish"
, listener
:
function
)
:
this
once
(
event
:
"pipe"
, listener
:
function
)
:
this
once
(
event
:
"unpipe"
, listener
:
function
)
:
this
once
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
"close"
listener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"drain"
listener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"error"
listener:
function
(
error
:
Error
)
:
void
Parameters
error:
Error
Returns
void
Returns
this
Parameters
event:
"finish"
listener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"pipe"
listener:
function
(
src
:
stream.Readable
)
:
void
Parameters
src:
stream.Readable
Returns
void
Returns
this
Parameters
event:
"unpipe"
listener:
function
(
src
:
stream.Readable
)
:
void
Parameters
src:
stream.Readable
Returns
void
Returns
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
pipe
pipe<T>
(
destination
:
T
, options
?:
object
)
:
T
Type parameters
T
:
WritableStream
Parameters
destination:
T
Optional
options:
object
Optional
end
?:
boolean
Returns
T
prepend
Listener
prepend
Listener
(
event
:
"close"
, listener
:
function
)
:
this
prepend
Listener
(
event
:
"drain"
, listener
:
function
)
:
this
prepend
Listener
(
event
:
"error"
, listener
:
function
)
:
this
prepend
Listener
(
event
:
"finish"
, listener
:
function
)
:
this
prepend
Listener
(
event
:
"pipe"
, listener
:
function
)
:
this
prepend
Listener
(
event
:
"unpipe"
, listener
:
function
)
:
this
prepend
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
"close"
listener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"drain"
listener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"error"
listener:
function
(
error
:
Error
)
:
void
Parameters
error:
Error
Returns
void
Returns
this
Parameters
event:
"finish"
listener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"pipe"
listener:
function
(
src
:
stream.Readable
)
:
void
Parameters
src:
stream.Readable
Returns
void
Returns
this
Parameters
event:
"unpipe"
listener:
function
(
src
:
stream.Readable
)
:
void
Parameters
src:
stream.Readable
Returns
void
Returns
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
prepend
Once
Listener
prepend
Once
Listener
(
event
:
"close"
, listener
:
function
)
:
this
prepend
Once
Listener
(
event
:
"drain"
, listener
:
function
)
:
this
prepend
Once
Listener
(
event
:
"error"
, listener
:
function
)
:
this
prepend
Once
Listener
(
event
:
"finish"
, listener
:
function
)
:
this
prepend
Once
Listener
(
event
:
"pipe"
, listener
:
function
)
:
this
prepend
Once
Listener
(
event
:
"unpipe"
, listener
:
function
)
:
this
prepend
Once
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
"close"
listener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"drain"
listener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"error"
listener:
function
(
error
:
Error
)
:
void
Parameters
error:
Error
Returns
void
Returns
this
Parameters
event:
"finish"
listener:
function
(
)
:
void
Returns
void
Returns
this
Parameters
event:
"pipe"
listener:
function
(
src
:
stream.Readable
)
:
void
Parameters
src:
stream.Readable
Returns
void
Returns
this
Parameters
event:
"unpipe"
listener:
function
(
src
:
stream.Readable
)
:
void
Parameters
src:
stream.Readable
Returns
void
Returns
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
raw
Listeners
raw
Listeners
(
event
:
string
|
symbol
)
:
Function
[]
Parameters
event:
string
|
symbol
Returns
Function
[]
remove
All
Listeners
remove
All
Listeners
(
event
?:
string
|
symbol
)
:
this
Parameters
Optional
event:
string
|
symbol
Returns
this
remove
Header
remove
Header
(
name
:
string
)
:
void
Parameters
name:
string
Returns
void
remove
Listener
remove
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
set
Header
set
Header
(
name
:
string
, value
:
number
|
string
|
string
[]
)
:
void
Parameters
name:
string
value:
number
|
string
|
string
[]
Returns
void
set
Max
Listeners
set
Max
Listeners
(
n
:
number
)
:
this
Parameters
n:
number
Returns
this
set
Timeout
set
Timeout
(
msecs
:
number
, callback
?:
function
)
:
void
Parameters
msecs:
number
Optional
callback:
function
(
)
:
void
Returns
void
Returns
void
write
write
(
chunk
:
string
|
Uint8Array
, callback
?:
function
)
:
boolean
write
(
chunk
:
string
|
Uint8Array
, encoding
:
string
, callback
?:
function
)
:
boolean
Parameters
chunk:
string
|
Uint8Array
Optional
callback:
function
(
err
:
Error
)
:
void
Parameters
err:
Error
Returns
void
Returns
boolean
Parameters
chunk:
string
|
Uint8Array
encoding:
string
Optional
callback:
function
(
err
:
Error
)
:
void
Parameters
err:
Error
Returns
void
Returns
boolean
write
Continue
write
Continue
(
)
:
void
Returns
void
write
Head
write
Head
(
statusCode
:
number
, headers
?:
OutgoingHttpHeaders
)
:
this
write
Head
(
statusCode
:
number
, statusMessage
:
string
, headers
?:
OutgoingHttpHeaders
)
:
this
Parameters
statusCode:
number
Optional
headers:
OutgoingHttpHeaders
Returns
this
Parameters
statusCode:
number
statusMessage:
string
Optional
headers:
OutgoingHttpHeaders
Returns
this
Static
listener
Count
listener
Count
(
emitter
:
EventEmitter
, event
:
string
|
symbol
)
:
number
deprecated
since v4.0.0
Parameters
emitter:
EventEmitter
event:
string
|
symbol
Returns
number
Globals
"http"
"http2"
constants
"https"
"net"
"tls"
generate
Self
Signed
Certificate
parse
Cookie
path
ToRegex
session
InMemory
Client
Http2
Session
Client
Http2
Stream
Http2
Secure
Server
Http2
Server
Http2
Server
Request
Http2
Server
Response
constructor
connection
finished
headers
Sent
send
Date
socket
status
Code
status
Message
stream
default
Max
Listeners
add
Listener
add
Trailers
create
Push
Response
emit
end
event
Names
get
Header
get
Header
Names
get
Headers
get
Max
Listeners
has
Header
listener
Count
listeners
off
on
once
pipe
prepend
Listener
prepend
Once
Listener
raw
Listeners
remove
All
Listeners
remove
Header
remove
Listener
set
Header
set
Max
Listeners
set
Timeout
write
write
Continue
write
Head
listener
Count
Http2
Session
Http2
Stream
Server
Http2
Session
Server
Http2
Stream
Alternative
Service
Options
Client
Session
Options
Client
Session
Request
Options
Incoming
Http
Headers
Incoming
Http
Status
Header
Secure
Client
Session
Options
Secure
Server
Options
Secure
Server
Session
Options
Server
Options
Server
Session
Options
Server
Stream
File
Response
Options
Server
Stream
File
Response
Options
With
Error
Server
Stream
Response
Options
Session
Options
Session
State
Settings
Stat
Options
Stream
Priority
Options
Stream
State
connect
create
Secure
Server
create
Server
get
Default
Settings
get
Packed
Settings
get
Unpacked
Settings
Generated using
TypeDoc
since v4.0.0