Send Vert.x HttpClient requests the Vert.x 4 way

Proprietary

Vert.x 4 removed the HttpClient methods that create a request for one HTTP method, such as get(..), post(..), getAbs(..) and getNow(..). A request created and ended in one statement, such as client.post(port, host, uri, response -> ...).putHeader(name, value).end(body), becomes client.request(HttpMethod.POST, port, host, uri).compose(req -> req.putHeader(name, value).send(body)).onSuccess(response -> ...), with an exception handler of the request becoming onFailure(..). Requests kept in a variable and ended later are left alone.

io.moderne.vertx.MigrateHttpClientRequests
mod run . --recipe=io.moderne.vertx.MigrateHttpClientRequests

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.