public MetricDataStream getMetric(MetricQuery query) throws PlatformLayerClientException {
String relativePath = buildRelativePath(query.item) + "/metrics";
StreamingResponse response = doRequest(HttpMethod.POST, relativePath, StreamingResponse.class, Format.JSON,
query, Format.XML);
MetricDataStream dataStream;
try {
dataStream = JsonMetricDataStream.build(response.getResponseStream());
response = null; // Don't close yet
} catch (IOException e) {
throw new PlatformLayerClientException("Error parsing returned data", e);