vertx / io.vertx.core.http / HttpServerResponse / push

push

abstract fun push(method: HttpMethod, host: String, path: String, handler: Handler<AsyncResult<HttpServerResponse>>): HttpServerResponse

Like #push(HttpMethod, String, String, MultiMap, Handler) with no headers.

abstract fun push(method: HttpMethod, path: String, headers: MultiMap, handler: Handler<AsyncResult<HttpServerResponse>>): HttpServerResponse
abstract fun push(method: HttpMethod, path: String, handler: Handler<AsyncResult<HttpServerResponse>>): HttpServerResponse

Like #push(HttpMethod, String, String, MultiMap, Handler) with the host copied from the current request.

abstract fun push(method: HttpMethod, host: String, path: String, headers: MultiMap, handler: Handler<AsyncResult<HttpServerResponse>>): HttpServerResponse

Push a response to the client. The handler will be notified with a success when the push can be sent and with a failure when the client has disabled push or reset the push before it has been sent. The handler may be queued if the client has reduced the maximum number of streams the server can push concurrently. Push can be sent only for peer initiated streams and if the response is not ended.

Parameters

method - the method of the promised request

host - the host of the promised request

path - the path of the promised request

headers - the headers of the promised request

handler - the handler notified when the response can be written

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