RestSession: Use StringEntity(String, Charset)

Pass the Charset rather than Charset.name().

Change-Id: I82ebfec4db251e431c03a9fed64d771652ab9989
This commit is contained in:
David Pursehouse
2015-10-16 23:41:52 +09:00
parent 54e55960d0
commit fccaf81dd9

View File

@@ -79,7 +79,7 @@ public class RestSession extends HttpSession {
put.addHeader(new BasicHeader("Content-Type", "application/json"));
put.body(new StringEntity(
OutputFormat.JSON_COMPACT.newGson().toJson(content),
UTF_8.name()));
UTF_8));
}
return execute(put);
}
@@ -105,7 +105,7 @@ public class RestSession extends HttpSession {
post.addHeader(new BasicHeader("Content-Type", "application/json"));
post.body(new StringEntity(
OutputFormat.JSON_COMPACT.newGson().toJson(content),
UTF_8.name()));
UTF_8));
}
return execute(post);
}