private Map<String, String> decodeArguments(HttpRequest request) throws IOException {
ChannelBuffer content = request.getContent();
if (!content.readable()) {
return ImmutableMap.of();
}
Reader reader = new InputStreamReader(new ChannelBufferInputStream(content), Charsets.UTF_8);
try {
Map<String, String> args = GSON.fromJson(reader, STRING_MAP_TYPE);
return args == null ? ImmutableMap.<String, String>of() : args;
} catch (JsonSyntaxException e) {
LOG.info("Failed to parse runtime arguments on {}", request.getUri(), e);