vertx / io.vertx.core.http / HttpServerResponse / write

write

abstract fun write(data: Buffer): HttpServerResponse abstract fun write(chunk: String, enc: String): HttpServerResponse

Write a String to the response body, encoded using the encoding enc.

Parameters

chunk - the string to write

enc - the encoding to use

Return
a reference to this, so the API can be used fluently

abstract fun write(chunk: String): HttpServerResponse

Write a String to the response body, encoded in UTF-8.

Parameters

chunk - the string to write

Return
a reference to this, so the API can be used fluently