headers.add("Content-Type", "application/json");
}
try {
ClientResponse response = null;
if (request.entity() != null && request.entity().getEntity() != null) {
response = target.getHeadHandler().handle(new ClientRequestImpl(target.getURI(), request.method().name(), request.entity().getEntity(), headers));
} else {
response = target.getHeadHandler().handle(new ClientRequestImpl(target.getURI(), request.method().name(), null, headers));
}
return new JerseyResponse(response);
} catch (UniformInterfaceException e) {
throw new OpenStackResponseException(e.getResponse().getClientResponseStatus().getReasonPhrase(), e.getResponse().getStatus());
}