Methods
renderBody
- renderBody(this, body, encoding?): void
-
Parameters
-
this: void
-
body: string | Buffer
-
Optional
encoding: BufferEncoding
Returns void
renderHtml
- renderHtml(this, html): void
-
Parameters
-
this: void
-
html: string | Buffer
Returns void
renderJson
- renderJson(this, body): void
-
Returns void
HTTP response body render means.
It is implied that response body is generated by these means only. I.e. nothing is written to
ServerResponse
directly.All
renderXXX
methods writeContent-Length
header. They skip writing content body when request method isHEAD
.