return execute(convertToRequest(httpRequest), responseHandler, errorResponseHandler);
}
@Deprecated
protected Request<?> convertToRequest(HttpRequest httpRequest) {
Request<?> request = new DefaultRequest(httpRequest.getServiceName());
request.setContent(httpRequest.getContent());
request.setEndpoint(httpRequest.getEndpoint());
request.setHttpMethod(httpRequest.getMethodName());
request.setResourcePath(httpRequest.getResourcePath());
for (Entry<String, String> parameter : httpRequest.getParameters().entrySet()) {
request.addParameter(parameter.getKey(), parameter.getValue());
}
for (Entry<String, String> parameter : httpRequest.getHeaders().entrySet()) {
request.addHeader(parameter.getKey(), parameter.getValue());
}
return request;
}