/** * Use the passed HTTP method to send to the given URL. When connection has been made, * the passed handler is invoked and can be used to tune the request and * write data to it. * * @param method the HTTP method to send * @param url the target remote URL * @param handler the {@link Function} to invoke on opened TCP connection * @return a {@link Mono} of the {@link HttpServerResponse} ready to consume for * response */ public Mono<HttpClientResponse> request(HttpMethod method, String url, Function<? super HttpClientRequest, ? extends Publisher<Void>> handler) { if (method == null || url == null) { throw new IllegalArgumentException("Method && url cannot be both null"); } return new MonoHttpClientResponse(this, url, method, handler(handler, options)); }