use of com.netflix.client.http.HttpRequest in project spring-cloud-netflix by spring-cloud.
the class RibbonHttpRequest method executeInternal.
@Override
protected ClientHttpResponse executeInternal(HttpHeaders headers) throws IOException {
try {
addHeaders(headers);
if (outputStream != null) {
outputStream.close();
builder.entity(outputStream.toByteArray());
}
HttpRequest request = builder.build();
HttpResponse response = client.executeWithLoadBalancer(request, config);
return new RibbonHttpResponse(response);
} catch (Exception e) {
throw new IOException(e);
}
}
Aggregations