vertx / io.vertx.kotlin.core.http / io.vertx.core.http.HttpServerResponse

Extensions for io.vertx.core.http.HttpServerResponse

pushAwait

suspend fun HttpServerResponse.pushAwait(method: HttpMethod, host: String, path: String): HttpServerResponse

Like io.vertx.core.http.HttpServerResponse with no headers.

suspend fun HttpServerResponse.pushAwait(method: HttpMethod, path: String, headers: MultiMap): HttpServerResponse
suspend fun HttpServerResponse.pushAwait(method: HttpMethod, path: String): HttpServerResponse

Like io.vertx.core.http.HttpServerResponse with the host copied from the current request.

suspend fun HttpServerResponse.pushAwait(method: HttpMethod, host: String, path: String, headers: MultiMap): HttpServerResponse

Push a response to the client.

sendFileAwait

suspend fun HttpServerResponse.sendFileAwait(filename: String): Unit
suspend fun HttpServerResponse.sendFileAwait(filename: String, offset: Long): Unit

Like io.vertx.core.http.HttpServerResponse but providing a handler which will be notified once the file has been completely written to the wire.

suspend fun HttpServerResponse.sendFileAwait(filename: String, offset: Long, length: Long): Unit

Like io.vertx.core.http.HttpServerResponse but providing a handler which will be notified once the file has been completely written to the wire.