List of usage examples for io.vertx.core.http RequestOptions setHost
public RequestOptions setHost(String host)
From source file:org.apache.servicecomb.transport.rest.client.http.RestClientInvocation.java
License:Apache License
void createRequest(IpPort ipPort, String path) { URIEndpointObject endpoint = (URIEndpointObject) invocation.getEndpoint().getAddress(); RequestOptions requestOptions = new RequestOptions(); requestOptions.setHost(ipPort.getHostOrIp()).setPort(ipPort.getPort()).setSsl(endpoint.isSslEnabled()) .setURI(path);//ww w . j a va 2 s.c o m HttpMethod method = getMethod(); LOGGER.debug("Sending request by rest, method={}, qualifiedName={}, path={}, endpoint={}.", method, invocation.getMicroserviceQualifiedName(), path, invocation.getEndpoint().getEndpoint()); clientRequest = httpClientWithContext.getHttpClient().request(method, requestOptions, this::handleResponse); }